Add an option to hide the drop down arrow (or the complete drop down including arrow) for "no choice inputs"
Opened this issue · 0 comments
marcopenhacking commented
Is your feature request related to a problem? Please describe.
I like to have an easy way using an option to hide the drop down arrow (marked yellow). This is to made a special input field with just one pre-defined data selection look the same like other input field with multiple choices on the same page.
Describe the solution you'd like
Add an option removeDropDownButton (for just arrow) or removeDropDown to remove the drop down completely with the arrow button
This removes the drop-down but not the drop down arrow:
callbackOnCreateTemplates: function(template) {
return {
dropdown: (classNames, isSelectOne) => {
return template(`
<div class="${classNames.listDropdown} choices__list--hidden"></div>
`);
}
};
}
...
document.addEventListener('DOMContentLoaded', (event) => {
const dropdown = document.querySelector('.choices__list--hidden');
if (dropdown) {
dropdown.remove();
}
});
...
Describe alternatives you've considered
Suppress the button using CSS. My first attempts failed.
Additional context
Add any other context or screenshots about the feature request here.