[v8] expansion of sub rows hides after global filter
Describe the bug
Hi,
I have created a table that performs the row expansion as well as has a global search filter for filtering of data.
Currently, I am facing an issue that the expansion hides after performing the search. But the filter works properly, only the filtered values lost the functionality of expanding.
@tannerlinsley Please help us to resolve this one
Your minimal, reproducible example
https://codesandbox.io/s/tanstack-table-filter-pagination-issue-k7sm34?file=/src/main.tsx:0-7691
Steps to reproduce
-
Go to this code sandbox link
-
Type text on the search bar
-
You can see the expansion icon hides after you get the filtered results
Expected behavior
As a user, I expected to get the filtered rows with the functionality of expansion as well.
How often does this bug happen?
Every time
Screenshots or Videos
https://user-images.githubusercontent.com/36889650/182665279-f3cc3a42-cb39-4d7a-bd8b-7c8ff1db7a0a.mov
Platform
macOS
react-table version
v8.5.5
TypeScript version
No response
Additional context
No response
Terms & Code of Conduct
- [X] I agree to follow this project's Code of Conduct
- [X] I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
@tannerlinsley it seems this issue was there on the previous version as well #2241 and #2064
https://github.com/TanStack/table/issues/2064#issuecomment-880303980
As far as the library is concerned, this is supposed to be expected behavior. If you don't want that to happen, set the autoResetExpanded option to false
I set this, but it is still the same. Could you please look at this one https://codesandbox.io/s/tanstack-table-filter-pagination-issue-k7sm34?file=/src/main.tsx:3687-3704
@tannerlinsley your help is needed here !!
I was about to report the same issue.
Case when you always need subrows in search results
Hi @dhanushkumarsivaji , did you find any workaround for this?
Hey! you have this option. Helped me in my case
(from here: https://tanstack.com/table/v8/docs/api/features/filters#maxleafrowfilterdepth)