Open rhyek opened 2 weeks ago
This issue is realted to TanStack. There would be several workarounds.
null
or undefined
in accessorFn, it has to be always of type stringfilterFn: 'includesString'
to remove nullisch entriesgetColumnCanGlobalFilter: (column) => return true
3.1 Keep in mind if you will to that you have to implement your globalFilterFn by your own to handle nullisch values
filterFns: {
customContains: (row, id, filterValue) => {
return row.getValue<TData>(id)?.includes(filterValue) || false;
}
},
TanStack/table#4919
Taking a quick stab at it, the first option worked.
mantine-react-table version
2.0.0-beta.7
react & react-dom versions
18.3.1
Describe the bug and the steps to reproduce it
When the first item in the data array has a column with a
null
value, the global filter excludes that column completely during search.Steps to reproduce:
city === 'Huntington'
Minimal, Reproducible Example - (Optional, but Recommended)
https://codesandbox.io/p/sandbox/unruffled-hellman-j6hk64
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
No, because I do not have time to dig into it
Terms