unovue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
4.97k stars 288 forks source link

[Bug]: Combobox/command updates searchTerm when modelValue is updated #811

Open kristofferdamborg opened 2 weeks ago

kristofferdamborg commented 2 weeks ago

Reproduction

https://stackblitz.com/edit/nce3t7-fwztma?file=src%2FApp.vue

Describe the bug

Binding a v-model to the Command component does not work as in the docs (combobox usage example - link). When the v-model (modelValue) is updated the searchTerm is updated with the value of the v-model as well (se video below).

https://github.com/user-attachments/assets/a880ae67-35ae-4b16-8a41-a38e7ec1a2fe

System Info

System:
    OS: macOS 14.6.1
    CPU: (12) arm64 Apple M3 Pro
    Memory: 74.47 MB / 18.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.4 - ~/.nvm/versions/node/v18.20.4/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v18.20.4/bin/npm
  Browsers:
    Chrome Canary: 131.0.6726.0

Contributes

artem-kostylev commented 1 week ago

Yes please fix this, I expect the same behavior as in shadcn-ui