[Vuejs]-How to disable a <md-select> in <md-field> on VueJS Material

0👍

You can add a button and add click event

<button @click="disableButtonClicked">Click to disable</button>

Then you can change your component’s variable let’s call it isDisabled

<md-field>
  <label for="movie">Movie</label>
  <md-select v-model="movie" name="movie" id="movie"  :disabled="isDisabled" ref="mdSelect">
    <md-option value="fight-club">Fight Club</md-option>
    <md-option value="godfather">Godfather</md-option>
    <md-option value="godfather-ii">Godfather II</md-option>
  </md-select>
</md-field>

or you can use its ref like

this.$refs.mdSelect 

and then do which action you want.

Leave a comment