I just noticed that on entering a filter input in any page other than first page, table is showing the results from last page. How can I reset the results to show from page 1?
Any suggestions??
Thank you,
@tannerlinsley Can you please suggest something about this, I'm trying to do something with onFilteredChange, but it's not calling on filter input.
You could use the onFilteredChange prop to listen for a filter change and set the page prop to 0. Though I feel like this should happen already without you doing anything. Could you fork the codepen from the readme and replicate this bug?
http://codepen.io/tannerlinsley/pen/VbBzWa?editors=0010 In this example, any time I filter, I am automatically given page 1 of the results. It must be something in your implementation. Could you post your component code for more details?
@yolohello12 is correct that it doesn't reset to the first page on filter change. What happens is that if the current page > number of pages then it sets page = last available page.
In that codepen go to page 3 and then search for an age = 2 and you can see the behavior. Maybe we do want to reset to page 0 on filter change. Not sure.
Interesting. I would think that filtering would temporarily go to page 1 of the filtered content (or it would go to the equivalent page in the filtered results. Would it even make sense to return to the original unfiltered page when and if the filters are cleared?
I think that might be getting too fancy. Maybe we just reset the page to 0 on filter change and if they really need advanced logic they can implement it themselves.
http://codepen.io/anon/pen/PmBKVQ?editors=0110
I'm using a filtermethod for contained search, but even without that it's doing the same. Just like @aaronschwartz said, when I'm in any other page than page 1 and do a filter it either stays in that current page or shows the result from last page of filter results.
@aaronschwartz agreed. Just go to page 1 by default and let the controlledProps and callbacks provide the path to more custom stuff.
I'm facing the same issue, any fix available for this?
Not yet. This still needs to be fixed. Its just a matter of forcing a change to the first page when filtering and sorting