i wrote like this but when i press the button all comboboxes show up but i want when i press the button in any combobox only that combobox will show up
HTML
<div class="m-combobox">
<div class="select-list" :class="{'sl-activate':isActivate}">
<div class="select-item" v-for="item in departments" :key="item.DepartmentId">
<i class="fas fa-check"></i>
<div class="select-item-text">{{item.DepartmentName}}</div>
</div>
</div>
<div class="select">
<input class="m-combobox-input" type="text" placeholder="Chọn/Nhập thông tin">
<div class="m-combobox-button" @click="activateCbb">
<i class="fas fa-angle-down"></i>
</div>
</div>
</div>
<div class="m-combobox">
<div class="select-list" :class="{'sl-activate':isActivate}">
<div class="select-item" v-for="item in positions" :key="item.PositionId">
<i class="fas fa-check"></i>
<div class="select-item-text">{{item.PositionName}}</div>
</div>
</div>
<div class="select">
<input class="m-combobox-input" type="text" placeholder="Chọn/Nhập thông tin">
<div class="m-combobox-button" @click="activateCbb">
<i class="fas fa-angle-down"></i>
</div>
</div>
</div>
data
data: function () {
return {
positions: [],
departments: [],
isActivate: false,
};
}
Method
methods:{
activateCbb() {
this.isActivate = !this.isActivate;
},
}
Tks all!