Trouble Implementing Column Filtering in TanStack/shadcnUI React Table #3486
Unanswered
vladimirzb
asked this question in
Q&A
Replies: 3 comments
-
hello, did you ever find the solution to this? I am having a similar problem |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think in this example it is probably better to just use You can also define your custom
|
Beta Was this translation helpful? Give feedback.
0 replies
-
The accessorKey must match exactly with the property name in the data object, like serviceName and type |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently working on a project using TanStack/shadcnUI React Table for a data grid with filtering capabilities. However, I've encountered an issue where the column filter doesn't seem to function as expected. Despite setting the filter, no results are displayed when they should be.
Here's the relevant part of my code setup:
DataTable Component (
data-table.tsx
):Column Definitions (
columns.tsx
):Issue:
Even when I hardcode "Netflix" into the row data, filtering for "Netflix" yields no results. Here are the console logs when setting the filter:
The filter state shows that the filter is being set correctly, but the table does not display any filtered results.
Could someone help me identify what I might be doing wrong or missing in my implementation to get the filtering to work to work properly?
I was following this documentation: https://ui.shadcn.com/docs/components/data-table#filtering
Beta Was this translation helpful? Give feedback.
All reactions