v9.0.0-beta.5 breaks typings for filterFns #6311
Send to my agentTanStack Table version#
v9.0.0-beta.6
Framework/Library version#
19
Describe the bug and the steps to reproduce it#
After installing the latest beta version, the typings for FilterFn seems to have changed to no longer care about TData, but instead they are hard-coded to RowData. I traced the changes back to https://github.com/TanStack/table/pull/6304 which changed the typings for CustomFilterFns and other related types to FilterFn<TFeatures, RowData> instead of FilterFn<TFeatures, TData>: https://github.com/TanStack/table/blob/beta/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L71-L79 https://github.com/TanStack/table/blob/beta/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L38-L43
Is this a bug, or should I be expected to cast RowData to my concrete TData inside the custom filter function?
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)#
Screenshots or Videos (Optional)#
No response
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.
KevinVandy closed this
Sign in to join this conversation.
This should be fixed in beta.10, though be advised that this release has some breaking changes in how filterFns and rowModels are defined in order to have better type-safety