'multi-select' filter throws error when accessorKey is number #370
Replies: 1 comment 1 reply
-
MultiSelect works with strings, not numbers. You should cast your values to strings where appropriate, the package cannot do it for you since we do not know the shape of your data. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
mantine-react-table version
v1.3.4
react & react-dom versions
18.2.0
Describe the bug and the steps to reproduce it
I am declaring columns as below, where ACTIVE is a number field and is usually 0/1. What I noticed that the multiselect filter works fine when the column type is string, but in this scenario it throws an error and page becomes white when clicking on the filter icon in the header.
The exception is as below.
MultiSelect.tsx:59 Uncaught TypeError: Cannot read properties of undefined (reading 'toLowerCase')
at defaultFilter (MultiSelect.tsx:59:1)
at filterData (filter-data.ts:24:1)
at MultiSelect.tsx:293:1
at renderWithHooks (react-dom.development.js:16305:1)
at updateForwardRef (react-dom.development.js:19226:1)
at beginWork (react-dom.development.js:21636:1)
at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1)
at invokeGuardedCallback (react-dom.development.js:4277:1)
at beginWork$1 (react-dom.development.js:27451:1)
Requesting help if I am doing anything wrong. Thank You for the wonderful package.
Minimal, Reproducible Example - (Optional, but Recommended)
Screenshots or Videos (Optional)
Do you intend to try to help solve this bug with your own PR?
No, because I do not know how
Terms
Beta Was this translation helpful? Give feedback.
All reactions