-
Notifications
You must be signed in to change notification settings - Fork 77
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
Enhancement: Add clear affordance to combobox #3074
Comments
Related : #2311 |
+1. We need the icon placeholder for the VTSE product. |
+1 We'd love the single persist option as we use the single select combobox as a select menu where we want to always have an element selected. |
For this "single-persist" use case, would you expect to default selection to the first item if no children are set to active? |
For our use case it's not super important as we have a default value that we always select up front. But would be good to allow either. Classic
|
In my opinion, it shouldn't select the first item if none are active. It gives the dev more control, and they can always set one as active if they want. |
Re: select default : #4032 |
@macandcheese maybe Currently, it seems a user is always able to unselect the last selected item. Seems like we should prevent that somehow? |
disableClear
property
From #4738 We could look at the behavior of MUI as an example - they by default have a clear affordance that is opt-out with disableClear - this could be combined with fixing the regression to solve all the requests in - #3074 Basically always prevent ability to "double click clear" in single-select, but have the clear affordance, which in your use case you would opt-out of with the prop... I think that sounds reasonable? To summarize proposal: Always display a clear "x" affordance when the combobox is populated - in single select or in multi select. |
disableClear
property
|
Figma file is available for this. cc @jcfranco |
Update will be encompassed as part of #4738 |
Description
Follow up from Teams chat:
I'd like to propose adding a default clear button affordance, on single / multi select mode on combobox.
Consider these two comboboxes, both in (current) single mode:
https://jsbin.com/qodekogepi/1/edit?html,output
The first, as a user, is empty. If I select a value, I have no way to remove that now. The second, as a user, is already populated. This would be the use case for having a clear button, where the app needs a value there, whether it's a system default or a selection I've made in the past.
Adding "disableClear" would let apps remove the ability to clear this when needed.
Acceptance Criteria
To summarize proposal:
Which Component
Combobox
The text was updated successfully, but these errors were encountered: