Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when i useing thead Grouping. only set subHeader enableColumnFilter work, parent Column didn't work #5710

Open
2 tasks done
huangrenfang opened this issue Aug 15, 2024 · 5 comments

Comments

@huangrenfang
Copy link

huangrenfang commented Aug 15, 2024

TanStack Table version

v8.16.0

Framework/Library version

v18.2.0

Describe the bug and the steps to reproduce it

  1. go to the grouping example (https://tanstack.com/table/latest/docs/framework/react/examples/grouping)
  2. set {enableColumnFilter: true} for parentColumn and subParent
  3. wirte the debug code for or console.log(header.column.getCanFilter())
  4. that result was false

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://codesandbox.io/p/sandbox/modest-lederberg-lzppdp

Screenshots or Videos (Optional)

image image image

Do you intend to try to help solve this bug with your own PR?

None

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • 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.
@huangrenfang
Copy link
Author

how can i resolve this problem. Is it fixed in latest version?

@huangrenfang
Copy link
Author

@KevinVandy please have a look, it confused me, help!

@KevinVandy
Copy link
Member

You can only filter from a leaf column

@huangrenfang
Copy link
Author

huangrenfang commented Aug 15, 2024

You can only filter from a leaf column

Is it a column doesn't have subColumn call Leaf Column.

image image image

i didn't define any sub columns, but it not work either

this is Reproducible expample url: https://codesandbox.io/p/sandbox/modest-lederberg-lzppdp
@KevinVandy

@KevinVandy
Copy link
Member

KevinVandy commented Aug 15, 2024

TanStack Table itself doesn't let you sort, filter, group by, etc. from the header groups (parent group columns) because what values would it be performing those actions on? You can ignore the default logic from TanStack Table and shove in your own UI anyway though.

Your sandbox is not public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants