Closed mjbates7 closed 11 months ago
@zernonia It seems that it is not only a bug with objects. The whole combobox logic has been broken since version 1.2. I just noticed this in my app and rolled back to 1.1.3 where everything works fine. Here on https://www.shadcn-vue.com/docs/components/combobox.html it also broken, but works as expected on https://www.radix-vue.com/components/combobox.
@mjbates7 thanks for the issue. the idea is to use searchTerm
to render the input text. However we find it quite difficult to utilize. Instead, I would propose to add displayValue
similar to headless/ui
to render the text.
@MellKam the issue is that after the latest refactoring, ComboboxItem
needs to be wrapped inside ComboboxList
. I've updated the docs to mentioned that.
https://www.shadcn-vue.com/docs/components/combobox
Also an issue incase anything facing the same: https://github.com/radix-vue/shadcn-vue/issues/188
@mjbates7 I've added displayValue
as proposed above. Checkout https://www.radix-vue.com/components/combobox.html#root
Environment
Link to minimal reproduction
https://stackblitz.com/edit/vue-enuzxs
Steps to reproduce
Describe the bug
Value doesn't get entered into the search input and value doesn't remain so you can't see what is selected
Expected behavior
Expect the value to remain in the input field like when viewing the example where it just uses an array of strings
Conext & Screenshots (if applicable)
No response