table icon indicating copy to clipboard operation
table copied to clipboard

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

Open huangrenfang opened this issue 1 year ago • 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
  5. 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

    • [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.

huangrenfang avatar Aug 15 '24 03:08 huangrenfang

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

huangrenfang avatar Aug 15 '24 03:08 huangrenfang

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

huangrenfang avatar Aug 15 '24 03:08 huangrenfang

You can only filter from a leaf column

KevinVandy avatar Aug 15 '24 03:08 KevinVandy

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

huangrenfang avatar Aug 15 '24 05:08 huangrenfang

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

KevinVandy avatar Aug 15 '24 13:08 KevinVandy