reactable-search | React component is a simple live | Grid library
kandi X-RAY | reactable-search Summary
kandi X-RAY | reactable-search Summary
This React component is a simple live-searchable table with some basic enhancements:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of reactable-search
reactable-search Key Features
reactable-search Examples and Code Snippets
Community Discussions
Trending Discussions on reactable-search
QUESTION
I am trying to create a React component called 'Proposals' that will render a tabular list of information received from the Django backend.
I am using the Reactable-Search component to form the table, but I've kept getting an error when I try to map the this.props.proposals values such as id, and proj_name to the table cells - Uncaught TypeError: Cannot read property 'cells' of undefined
Really not sure why because when I map this.props.proposals directly in the render return of a typical html table tags it is working i.e. rendering the backend data ok. and I've also used the Reactable-Search component with the mapping in other cases and it's worked fine.
Log output of this.props.proposals shows the correct array of objects also...:
Really appreciate if someone can nudge me in the right direction, thanks!
The Proposals component:
...ANSWER
Answered 2019-Jan-23 at 01:31The problem is that you are requesting the proposals asynchronously but the SearchTable
component doesn't seem to work with empty initial proposals object. Try passing in an empty array as its rows
prop and you'll get the exact same error message about undefined object.
To fix this you need to show a loading indicator instead of the SearchTable
while the proposals are being fetched. Your reducer should look something like this, except you should also handle failure case:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install reactable-search
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page