[Vuejs]-Select the option of other select dropdown

1👍

You can attach a function at the change event of the first select:

<select id="praparat" v-model="selectedProduct" @change="setSecondToDefault">

then, in the Vue instance, set the value of the second select to default, like this:

methods: {
  setSecondToDefault() {
    this.selectedIeProKg = 0
  }
}

jQuery and Vue don’t work together very well, because jQuery acts directly on DOM elements and Vue use a virtual DOM and it decides when and how to reflect changes on the actual DOM.

0👍

You can use a watcher in Vue js to track any changes in the v-model of your first dropdown and then trigger the required change in the watcher.
Just add the below code in your Vue Instance.

 watch: {
        'selectedProduct': function() {
         this.selectedIeProKg = 0
        }
    }

Leave a comment