#Multiselect data needs to be a string or a "SelectItem"

3 messages · Page 1 of 1 (latest)

craggy seal
#

Previously I had a MultiSelect with a data={StatusCodes} and a default value being a number. My data constant is of this format

data = [
{ value: 200, label: '200 - OK', group: 'Sucessful responses' },
...
]

However, this creates a build error after updating Mantine, stating that The expected type comes from property 'data' which is declared here on type 'IntrinsicAttributes & MultiSelectProps &

My questions are the following :

  • How can I fix this error to use a number as the type of my data ?
  • Why is it not allowed anymore to have data as a custom item?
neat valley
craggy seal
#

Nevermind I read it, makes sense