0

I’m trying to identify an event by click, change or keydown This is my code for listen event:

<div class="form-group input-group mb-3">
  <select 
    title="" 
    @change="onChange(this.value)" 
    v-model="formData.region" 
    class="form-control select2 select2-hidden-accessible" 
    id="region" 
    style="width: 100%; height: 35px !important;" 
    data-select2-id="1" 
    tabindex="-1" 
    aria-hidden="true"
  >
    <option selected="selected" disabled>Выберите область</option>
    <option v-for="(region, $index) in regions" :key="$index" :value="region.id">{{region.name}}</option>
  </select>
</div>
onChange(){
  alert('yes');
},

this is my code of declared formData

data() {
  return {
    formData: {
      region: '',
    }
  }
},

None of these methods worked out

SherylHohman
  • 16,580
  • 17
  • 88
  • 94

0 Answers0