#React filter null value in column
1 messages · Page 1 of 1 (latest)
Does your accessor or accessorFn return null value?
I think this might be related, you should convert the value to empty string accessorFn: (row) => row.yourColumnValues ?? '', and filter out empty string instead
Not only this helps me with the sorting behavior (https://github.com/TanStack/table/issues/4289) this also explicitly define your value to only string.
We also had problem with number Filter Type too and decided to convert the number value to string instead.
Thanks for the reply.
Even if a transform null to '', how do I filter to only empty string ?
Do I need to replace the filterFn of the columnDef ?