thicknessexpanded: false,
method(){
thicknessOnClick: function (event) {
this.thicknessexpanded = !this.thicknessexpanded;
},
}
.dropdown-check-list3 {
padding-left: 4px;
padding-bottom: 25px;
display: inline-block;
}
.dropdown-check-list3 .anchor3 {
margin-left: 20px;
width: 255px;
color: #70737a;
font-size: 14px;
font-weight: 500;
background-color: #ffff;
position: relative;
cursor: pointer;
display: inline-block;
padding: 5px 140px 5px 10px;
border: 2px solid #ccc;
}
.dropdown-check-list3 .anchor3:after {
position: absolute;
content: "";
border-left: 2px solid black;
border-top: 2px solid black;
padding: 5px;
right: 10px;
top: 35%;
transform: rotate(-135deg);
}
.dropdown-check-list3 .anchor3:active:after {
right: 8px;
top: 21%;
}
.dropdown-check-list3 ul.items3 {
width: 254px;
background-color: #ffff;
padding: 2px;
display: none;
margin: 0;
border: 1px solid #ccc;
border-top: none;
}
.dropdown-check-list3 ul.items3 li {
background-color: #ffff;
list-style: none;
}
.dropdown-check-list3.visible .anchor3 {
background-color: #ffff;
}
.dropdown-check-list3.visible > span.anchor3:after {
transform: rotate(45deg);
}
<div
class="dropdown-check-list3"
:class="{ visible: thicknessexpanded }"
tabindex="100"
>
<span class="anchor3" @click="thicknessOnClick">Select (mm)</span>
<ul class="items3">
<div class="checkbox-alignment-application-filter">
<li
id="thickness-filter1"
class="vh-product"
/>
<label class="productlist-specific" for="thickness-filter1"
>2.0mm</label
>
</div>
<div class="checkbox-alignment-application-filter">
<li
id="thickness-filter2"
class="vh-product"
/>
<label class="productlist-specific" for="thickness-filter2"
>22.0mm</label
>
</div>
<div class="checkbox-alignment-application-filter">
<li
id="thickness-filter3"
class="vh-product"
/>
<label class="productlist-specific" for="thickness-filter3"
>3.0mm</label
>
</div>
<div class="checkbox-alignment-application-filter">
<li
id="thickness-filter4"
class="vh-product"
/>
<label class="productlist-specific" for="thickness-filter4"
>4.0mm</label
>
</div>
</ul>
</div>
To make a selection from the dropdown menu and display the chosen value, I have implemented some functionality in the code snippet provided above. However, I am facing issues when trying to bind the selected value in the dropdown. Can someone offer guidance on how to achieve this properly?
If anyone could point out any mistakes in the code or suggest a starting point on displaying the selected value accordingly, it would be greatly appreciated.