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: support for custom values #1362

Open
d-m-s opened this issue Apr 16, 2024 · 3 comments
Open

Combobox: support for custom values #1362

d-m-s opened this issue Apr 16, 2024 · 3 comments

Comments

@d-m-s
Copy link

d-m-s commented Apr 16, 2024

Contribution desired?

Is a contribution to support custom values for the Clarity Combobox something that will get accepted?
see #171

Combobox: support for custom values

The combobox is a really helpful component, it just lacks the addition of custom values.
Whenever custom values are needed, currently the datalist is used as a replacement, but this results in inconsistent user-interfaces. Datalist also has some display issues in different browsers.
In the following usecase the datalist can not serve as replacement.

Usecase Tags/Labels

  • We're using it to add tags/labels to an object - there the multi-selection of the combobox is really great as the added items are designed as input-chips.
  • So existing tags can be added, but of course we have the necessity to create new tags, that need to be added to the list.
  • Datalist does not work as replacement as it does not support multi-selection.

Usability guidance

Currently the differentiation when to use datalist / combobox often puzzles designers/developlers and in the end of course our users.
Having the combobox supporting custom values / free text input would be a great step to unify the user interface.

Related discussion in core: vmware-clarity/core#162

@kevinbuhmann
Copy link
Member

I have a POC that might do what you need with the existing combobox component: https://stackblitz.com/edit/clarity-light-theme-clr16-7vvyfu?file=src%2Fapp%2Fapp.component.ts

@d-m-s
Copy link
Author

d-m-s commented Apr 16, 2024

Hi Kevin, thanks for the quick reply. Is this also applicable for the multi-selection mode? So either multiple values can be added OR a new one can be entered?

@kevinbuhmann
Copy link
Member

I just updated the above POC with multi-selection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants