Skip to content
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: removing selected option and/or displaying all options if selection exists #376

Open
jannetim opened this issue Feb 18, 2021 · 0 comments · Fixed by #1240
Open
Labels
bug Something isn't working. enhancement Request related to a current component/pattern/token/documentation.

Comments

@jannetim
Copy link

jannetim commented Feb 18, 2021

To which feature the request relates to

Seeing the full list of options after selection and/or removing selected option is difficult and rather unintuitive with Default single Combobox. After selection, the input text has to be either cleared with keyboard by selecting all and deleting, or with mouse by selecting the input text and clicking cut from the mouse actions menu to reset Combobox. I'd think the current implementation might be questionable from the accessibility point of view, too.

This problem can be produced in Storybook by selecting e.g. "Valinta 2" and then opening the dropdown again where only "Valinta 2" with checkmark is displayed with no apparent cue of how to unselect the option, or how to see other options that should be available. Screenshot below.

What

There's a few options to solve this. In my opinion best solution would be to combine Select and Combobox functionalities so that if Combobox is opened, even if something is already selected, the list of other options is always shown (Select example in Storybook). Example of similar feature can be seen with React Select's single select.

Alternative option (or even better: in addition to the previous solution) would be to implement clearable prop to default Combobox as currently only multiselect Combobox supports it. This could be done whilst implementing clearable in Select as described in the other issue thread.

Why

Current behaviour is confusing to the user and has a high probability that the user gets stuck. And in any case it creates a situation where unnecessary actions are needed if a selection needs to be changed afterwards.

Related material

Screenshot for the problematic list view: Screenshot 2021-02-18 at 10 01 22

React Select example: https://react-select.com/home

@laurakarhu laurakarhu added bug Something isn't working. enhancement Request related to a current component/pattern/token/documentation. labels Feb 18, 2021
@laurakarhu laurakarhu linked a pull request Mar 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. enhancement Request related to a current component/pattern/token/documentation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants