Vue.js not working with Semantic UI dropdown Vue.js not working with Semantic UI dropdown vue.js vue.js

Vue.js not working with Semantic UI dropdown


You are using a v-for directive on your option element without a key attribute. Without this key, Vue uses an "in-place patch" strategy to optimize rendering. This is most likely messing with what your Semantic UI dropdown is expecting as far as changes to the select element go.

Add a key attribute to your option tag, providing a unique id as the value:

<option v-for="option in options" :value="option.id" :key="option.id">  {{ option.text }}</option>

To clear the value in the model's select element when the make changes, you can use $('#vehicle-models').dropdown('restore defaults').

Also, if you put all the logic in one Vue instance, things become a lot simpler: Here's an example codepen.