Closed Avi-ADAM closed 3 years ago
how should i call it option={options.label} is not working and i get eather error of "Unexpected token "."" or get it as "object object" instead of the label string.
Could you share your full code here?
So that's what I was asking above. MultiSelect
doesn't currently support passing options as an array of objects. In its current implementation, you'd have to get rid of the country values and pass in only the country names:
<MultiSelect bind:selected {namefil} {placeholder} options={country.map(c => c.label)} {required} />
You mean turn
options
into an array of objects likeinstead of an array of literals (i.e. strings or ints) like
const options = ['Foo', 'Bar']
?