-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HxMultiSelect] - Filtering and/or searching #616
Comments
(This is probably for |
Would it be worth modifying the existing HxAutosuggest noting that we'd likely need a few different new multi-select properties just for this new functionality, or would it be better to create a new HxMultiSelectAutoSuggest? |
Probably a new component derived from HxAutossuggest would be needed. |
I've been attempting to build a new HxMultiSelectAutosuggest component utilising the core logic from the HxAutosuggest and have been making some progress but for at least the way I'm envisioning this component working I think it does make more sense to be something like a HxFilterMultiSelect. My requirements and what I'm envisioning is a HxMultiSelect where the list is pre-populated with a pre-defined list of every available option, but then when you click on the dropdown and start typing it will start filtering down the available options in the dropdown list. Given the list is pre-populated and you're filtering down rather than searching in my eyes it makes more sense to base it off the MultiSelect. What do people think? |
Do you want to cover a scenario, where there is a huge amount of possible items and you want to display just a few of them (= In case of |
I'd have a limited number of items in the dropdown. Edit: |
If you want to narrow the list of items only to "apples", you should probably somehow indicate there are more items already selected (the "banana" which is not visible now). |
At least for my use case I wouldn't need to see the full list of currently selected items when filtering. It would be absolutely fine to have the input only show the selected items when the filter is cleared. For example, with words Apple, Apple Juice, Banana, Orange, selected words Banana and Orange. State one - No filter: State two - Filter = "Apple": So, when filtering it shows the filter, then when you clear the filter, it returns back to showing the selected items. |
(Note for future: In case of large number of items, we might try to speed up the rendering by using |
What HxMultiSelect does right now is absolutely perfect for everything except the filtering itself. Would you be comfortable me going down this route and trying to build this? Does that make sense to you? |
I'm considering enhancing the existing HxMultiSelect component. Here are some quick ideas:
@bholbrook, if you're interested in contributing to this component, your help would be greatly appreciated! cc @crdo |
@hakenr I've spent the weekend implementing the changes in a local branch (feature/HxMultiSelect-filtering) and would love to create a pull request for them. |
I guess this is what you are looking for...? |
The current HxMultiSelect is great but when the list contains a large number of items it can be difficult or slow to scroll and find the specific item you're looking to select.
If the component could be modified to allow typing to filter the displayed items, I think it would greatly improve the flexibility and usefulness of the component.
Perhaps something like how the Bootstrap 5 DataList functions, but with a multi-select: https://getbootstrap.com/docs/5.0/forms/form-control/#datalists
The text was updated successfully, but these errors were encountered: