Skip to content
Source
Sign inSign up
TanStack/table

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

Openhuangrenfang(GitHub profile, opens in a new tab) opened this issue 5 comments

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

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.
  1. how can i resolve this problem. Is it fixed in latest version?

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

  3. You can only filter from a leaf column

  4. huangrenfang(GitHub profile, opens in a new tab)commented

    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

  5. KevinVandycommented

    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 in to join this conversation.