Hi,
I want to access the data returned from the filtered result. I'm trying with onfileredChange and defaultfilterMethod, but I'm only able to get all the data present in the table instead of just the search result.
Any suggestions are appreciated!!
Thanks.
Here's an example that uses the filtered results from onFilteredChange:
https://react-table.js.org/#/story/controlled-component
If you're still having issues post the code you have so we can take a look.
Thanks for the response. But that's returning the filter input value right. I want to access the updated results in table after filter.
Ah. In that case you'll probably need to save a ref to the table. And then in onFilteredChange you'll want to grab the sortedData state from the table.
I'm using the ref, but not sure how to grab the sortedData. Can you please gimme an example of what exactly you mean?
ref={el=> this.tableInstance = el}
Thank you,
This.tableInstance.getResolvedState().sotedData
On Fri, Jun 2, 2017 at 12:44 PM kirank3836 notifications@github.com wrote:
I'm using the ref, but not sure how to grab the sortedData. Can you please
gimme an example of what exactly you mean?ref={el=> this.tableInstance = el}
Thank you,
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tannerlinsley/react-table/issues/310#issuecomment-305877709,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFUmCTDqk0jWJP0Kdo8pSevYGV7dmNC-ks5sAFf0gaJpZM4NrmD0
.
Thanks a lot @tannerlinsley @aaronschwartz
Most helpful comment
This.tableInstance.getResolvedState().sotedData
On Fri, Jun 2, 2017 at 12:44 PM kirank3836 notifications@github.com wrote: