-
I have a situation where I want "filter" and "sort by" functionality on my table. When the user clicks on a row, I want a modal to show up with the row's information. I can get all that working, problem is that if the user filters and/or sorts before clicking on the row, the modal will show up but the table will reset to default state. Actually any update of any state variable on the page containing the table will reset the table. I've been tinkering with all sorts of different ways to "autoResetFilters" and "autoResetSortBy" for three days and I cannot get them to work. I can't get them to work even in the example sandboxes. I modified one of the examples to make it close to my situation. Apparently the table automatically has autoResetFilters and autoResetSortBy set to false. But even when I set them to true it seems to have no effect. I tried the FAQ's suggestion nearly verbatim and couldn't get it to have an effect. Forgive me if I'm making a rookie mistake, I'm new to React and Github. Hopefully I'm doing this right. I think I made a fork and I think you can find it here: https://codesandbox.io/s/gracious-water-9thfd?file=/src/App.js Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Guessing the issue - don't re-mount the table component when you open/close modal |
Beta Was this translation helpful? Give feedback.
Guessing the issue - don't re-mount the table component when you open/close modal