table icon indicating copy to clipboard operation
table copied to clipboard

[v8] expansion of sub rows hides after global filter

Open dhanushkumarsivaji opened this issue 3 years ago • 9 comments

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

  1. Go to this code sandbox link

  2. Type text on the search bar

  3. 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.

dhanushkumarsivaji avatar Aug 03 '22 16:08 dhanushkumarsivaji

@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

dhanushkumarsivaji avatar Aug 03 '22 23:08 dhanushkumarsivaji

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

KevinVandy avatar Aug 04 '22 03:08 KevinVandy

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

dhanushkumarsivaji avatar Aug 04 '22 05:08 dhanushkumarsivaji

@tannerlinsley your help is needed here !!

dhanushkumarsivaji avatar Aug 05 '22 13:08 dhanushkumarsivaji

I was about to report the same issue.

nomttr avatar Oct 19 '22 12:10 nomttr

Case when you always need subrows in search results Screenshot 2023-07-06 at 12 07 08

yurii-holenko avatar Jul 06 '23 09:07 yurii-holenko

Hi @dhanushkumarsivaji , did you find any workaround for this?

dharmikpatadia avatar Aug 17 '23 05:08 dharmikpatadia

Hey! you have this option. Helped me in my case (from here: https://tanstack.com/table/v8/docs/api/features/filters#maxleafrowfilterdepth) Screen Shot 2023-09-11 at 9 41 17

romansme avatar Sep 11 '23 06:09 romansme