[Vuejs]-How to deselect pre-selected group options in vue multi select?

0👍

 computed: {
    options_length: function () {
        return this.item.options.length;
    }
},
methods:{

    onSelectChange (value) {
        if (value.length == this.options_length && this.selectedAll === null) {
        console.log(this.options_length);
            this.selectedAll = true;
        } else if (value.length == this.options_length && this.selectedAll === true) {
            this.selectedOptions = [];
            this.selectedAll = null;
        }
        // do the thing
    },
👤juan

Leave a comment