nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
3.79k stars 462 forks source link

USelectMenu multiple count erro #2028

Open Stiropor opened 1 month ago

Stiropor commented 1 month ago

Environment


Version

v2.18.4

Reproduction

https://stackblitz.com/edit/nuxt-ui-gppwna?file=app.vue

Description

Using USelectMenu with multiple option having some preselected items returns count of 0. In reproduction link it should return 2.

Additional context

No response

Logs

No response

ldiellyoungl commented 1 month ago

hello. why don't you use this method?:

const options = [
  {
    key: 'id',
    label: 'ID',
  },
  {
    key: 'title',
    label: 'Title',
  },
  {
    key: 'status',
    label: 'Status',
  },
];

const selected = ref([options[0], options[1]]);
Stiropor commented 1 month ago

The selected gets filled on page load. This counter was working for past 6 months at least, it stopped around 2 weeks ago, can't remember with which update.