value: 'Select (mm)',
list: ["1mm","2mm","3mm", "4mm", "55mm"],
visible: false,
toggle() {
this.visible = !this.visible;
},
select(option) {
this.value = option;
},
<div class="thickness-productlist">CLEAR</div>
<div class="aselect" :data-value="value" :data-list="list">
<div class="selector" @click="toggle()">
<div class="label">
<span>{{ value }}</span>
</div>
<div class="arrow" :class="{ expanded : visible }"></div>
<div :class="{ hidden : !visible, visible }">
<ul>
<li :class="{ current : item === value }" v-for="item in list"
@click="select(item)" :key="item">{{ item }}</li>
</ul>
</div>
</div>
</div>
How to reset selected value from the dropdown on clicking of clear button in vuejs?
At present i am having the clear option, Where if i click on it, I want to selected value from the dropdown to get clear.