You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 to id, 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 shows 0 selected.
Logs
No response
The text was updated successfully, but these errors were encountered:
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
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 shows
0 selected
.Logs
No response
The text was updated successfully, but these errors were encountered: