T
TanStack2y ago
ambitious-aqua

Filtering table by status not working properly

As you can see in the image I am filtering my table by status which is a number and its defined in the columns. In columns.tsx { header: 'Status', accessorKey: 'status', enableSorting: true, cell: ({ row }) => { const status = statuses.find( (status) => status.value === row.original.status ); if (!status) { return null; } return ( <Badge variant={status.variant}> {status.label} - {status.value} </Badge> ); }, }, The values selected in the filter by status are being added to columnFilter inside my Table.tsx component. I dont understand why its not filtering correctly since I am passing the correct status number to the filter.
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?