Closed ThePlay3r closed 21 hours ago
It seems like the same problem as issue 2028
I suggest using by
when your v-model
is an object
or an array of objects
. This is because this component currently doesn't work when comparing objectA === objectB.
Environment
Build Modules: -
Version
Pro 1.4.1
Reproduction
https://stackblitz.com/edit/nuxt-ui-u6tm1b?file=app.vue
Description
When using a
v-model
prop with some initial object values (such as fetched already selected data from backend), the<USelectMenu>
component doesn't show these as selected and seems to ignore them completely.Even when selecting the same objects again, it just seems to add them to the array and disregard anything, that was there previously.
Additional context
The behaviour changes when setting the
by
prop. In my case, I set it toid
, after which I can see the object as selected, but only in the dropdown. This also allows me to edit the data as normal. (Select/Deselect) However the button itself still shows0 selected
.Logs
No response