[Vuejs]-How can I get text selected when category clicked on combobox ? (Vue.JS 2)

0👍

Given you want both id and name, you can try this:

    template: '\
        <select class="form-control" v-on:change="search">\
            <option v-for="option in options" v-bind:value="option.id"  @click="selected=option.name" v-bind:disabled="option.disabled">{{ option.name }}</option>\
        </select>',
    mounted() {
        this.fetchList();
    },

Leave a comment