Make some adjustments to your CSS code:
ORIGINAL CSS
#select-ul {
display: block;
cursor: pointer;
border: 0.1px solid rgba(0, 0, 0, .1);
border-top: 0;
background-color: white;
padding: 12px;
height: 300px;
overflow: auto;
float: none;
overflow-y:scroll;
}
UPDATED CSS
#select-ul {
z-index: 1;
display: none;
position: absolute;
width: 100%; /* you can change but must give width */
max-height: 300px;
cursor: pointer;
border: 1px solid #e5e5e5; /* 0.1px doesn't work */
border-top: 0;
padding: 12px;
background-color: white;
overflow: hidden scroll;
}
#select-ul.active {
display: flex;
flex-direction: column;
}
Ensure to convert some JavaScript parts into vue
since you are utilizing it.
const dropdown = document.querySelector('#select-ul');
dropdown.addEventListener('click', () => {
dropdown.classList.add('active'); // you can also use toggle
});
// additionally
dropdown.addEventListener('blur', () => {
dropdown.classList.remove('active');
});
Please let me know if this solution resolves the issue! Feel free to provide more details about the scaling problem you mentioned so I can better assist you.