#Multi-Select Doesn't open when value is selected - solved
38 messages · Page 1 of 1 (latest)
your data should be array of objs
<MultiSelect
data={[
{ value: "react", label: "React" },
{ value: "ng", label: "Angular" },
{ value: "svelte", label: "Svelte" },
{ value: "vue", label: "Vue" },
{ value: "riot", label: "Riot" },
{ value: "next", label: "Next.js" },
{ value: "blitz", label: "Blitz.js" }
]}
{...form.getInputProps("outdistrict")}
/>
note the one that the form will receive is the value and the label is what the user will see
nope, that has nothing to do with it
problem is with Mantine's useform behaviour i presume
https://codesandbox.io/s/multiselect-1qrogb
no problem with the form
you have multiple values to select and you want to select many. So it should be array!
I think you should give it [''] or it will give error later.
is your user?.outdistrict array type?
yeah, context type:
prisma scheme:
I guess my case might be unique
thanks for trying to help @sick oar
No problem. I dont think the issue with the select it self though. Try to check around it. Maybe display outside everything label or others. So you can find if it still have the issue or not.
i removed {...form.getInputProps("outdistrict")}
and it still not working to be honest
super weird
@sick oar
I FOUND THE PROBLEM
🤣 🤣 🤣 🤣 🤣 🤣 🤣 🤣 🤣 🤣 🤣 🤣 🤣
I changed label to div
and it started working
for some weird reason basically if you place MultiSelect inside <label> It will not work as expected</label>
Multi-Select Doesn't open when value is selected - solved