-
-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hi, thank you for this indispensable or requisite select plugin. It is the most functional plugin on the internet I could find that actually works and supports bootstrap dark and light mode themes.
I have a few ideas below to make this plugin more customizable.
-
May you please consider adding a feature that limits the size of visible select list options. Currently the size attribute is not respected and all options are visible.
-
May you please consider adding a feature that allows hiding the dropdown options from being visible unless they match the first 2 or 3 characters of what the user is typing. This will give users a true feel and behaviour that one gets when using google searching engine.
-
May you please consider horizontal scrolling behaviour especially when the select element has a lot of options to display or show, they occupy less space compared to vertical scrolling.
-
May you consider allowing the initialization of multiple select elements using the array syntax e.g.
new UseBootstrapSelect([...])to avoid having to loop through matching elements as below.
const initializeElements = () => {
const elements = document.querySelectorAll(".form-select");
selects = Array.from(
elements,
(element) => new UseBootstrapSelect(element)
);
};
- May you please consider allowing the clearing of multiple select elements using the array syntax and a static method e.g.
UseBootstrapSelect.clearValues([...])to avoid keeping references to initialized select elements and using a loop to clear elements.
const clearSelectValues = () => {
selects.forEach((select) => select.clearValue());
};
