Incorrect typing for mantineEditSelectProps
column option (multi-select vs. select)?
#479
Open
1 task done
mantine-react-table version
2.0.0-beta.8
react & react-dom versions
19.0.0
Describe the bug and the steps to reproduce it
When I add column options for a single-select edit mode (
select
and notmulti-select
), like:...then the TypeScript type of the
value
parameter of theonChange
handler isstring[]
instead of the actual underlying type of the passed-in object, which is juststring
, and you get a type error like this:The underlying issue seems to be that the typing here is off:
mantine-react-table/packages/mantine-react-table/src/types.ts
Lines 538 to 545 in 2a943be
Note that it says
Partial<MultiSelectProps>
instead ofPartial<SelectProps>
.It looks like this is only an issue for the columnar option, not for the equivalent option for the whole table, which correctly uses
Partial<SelectProps>
:mantine-react-table/packages/mantine-react-table/src/types.ts
Lines 902 to 909 in 2a943be
Minimal, Reproducible Example - (Optional, but Recommended)
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
None
Terms
The text was updated successfully, but these errors were encountered: