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
Combobox: New component #673
Comments
As an accessibility reference please consider the best practice recommendation from WAI-ARIA combobox with listbox popup |
API Proposal Combobox Advanced structure
Inputs
Outputs
Content projection Checklist
|
Hey @lukett89, thank you for the API proposal. Really great starting point. I'd add
We should consider also adding getters for the open state like "opened" and outputs when that state changes. |
Thanks for your reply @ffriedl89. |
Final API Proposal Combobox Advanced structure
Inputs
Outputs
Content projection Checklist
|
I'd like to take care of implementing this feature within the next 2 weeks. Could you assign the issue to me please? |
In sync and after discussion with @heartdisease and @lukett89, I have reassigned the issue. |
I propose the addition of two more inputs:
The displayWith function is relevant for using the combobox with objects and a loading indicator seems warranted for a component that - in most cases - will offload filtering to the server side. |
Feature Request
Summary
Add a combobox component to the library.
Feature Description
We are dealing with a lot of data. Our dt-select does not really work with a large set of options. The search functionality for the dt-select is the same as in the native select. Therefore, a user can only jump to an option that starts with the key the user pressed.
This is really limiting in use cases with large datasets.
A combobox component that can be constructed out of an input with an dt-autocomplete attached can help us there.
The input needs to show a placeholder text.
The combobox should use the same styles as the dt-select.
Behavior
On click the dropdown opens a list of several items for the user to choose from and the cursor is placed in the input field. As soon as users start typing the combobox should emit a debounced event and show a loading indicator inside the input similar to the one we already have in the filter-field.
Once an item is selected, the dropdown closes and the input field is updated accordingly.
For the first version of the combobox, I suggest not worrying about virtual scrolling. We can expect the filtering of the items to be done on the server side. The items populated on the client can be rendered. We can improve the handling of large datasets in a second version.
For the first version i'd suggest using the dt-autocomplete, but we should consider creating a simplified dropdown with a datalist.
Attachments
The text was updated successfully, but these errors were encountered: