manish-nepal / vue3-select-option-searchable

Vue 3 select option to select an object from a list or an array
MIT License
6 stars 1 forks source link

Data is not being updated on the fly #4

Closed dylansproule closed 1 year ago

dylansproule commented 1 year ago

For example a simple fetch after an initial init doesn't work. If a Vue ref is used we cannot modify the binding, it just doesn't take, I've tried both composition and vue 3 setup as in your guide, so what if we don't have the data on time of render?

Thanks for any input!

dylansproule commented 1 year ago

Apparently this was the fix:

:key="componentKey"

incrementing the componentKey when data changes worked