table icon indicating copy to clipboard operation
table copied to clipboard

[v8]: getCanFilter returns false in manual filtering when no accessor key is defined

Open fknop opened this issue 3 years ago • 0 comments

Describe the bug

Hello!

I am not sure if this is intentional or not but seems a little counter-intuitive. The manual filtering option still requires an accessorFn/accessorKey for the getCanFilter function to return true.

I'm using the manual filtering and server side filtering, I am simply using the filter state and do not rely on any front-end filtering logic. So I don't think the accessorFn should be required in that case

Your minimal, reproducible example

https://github.com/TanStack/table/blob/6e40f0285644c6507cad33df6e95dc9a31364fbc/packages/table-core/src/features/Filters.ts#L238

Steps to reproduce

  • Create a table with manual filtering
  • Create a column with a cell function and no accessor, enable filtering for that column
  • getCanFilter returns false for that column

Expected behavior

  • Should getCanFilter return true instead when manual filtering is enabled?

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Any

react-table version

v8

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.

fknop avatar Aug 17 '22 17:08 fknop