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

[Feature]: Add a Clear Button to Combobox #1654

Open
2 tasks
maximepvrt opened this issue Feb 24, 2025 · 4 comments
Open
2 tasks

[Feature]: Add a Clear Button to Combobox #1654

maximepvrt opened this issue Feb 24, 2025 · 4 comments

Comments

@maximepvrt
Copy link

Describe the feature

It would be useful to have an option to display a "clear" button in the Combobox component of Reka UI. This button would allow users to remove the selected value(s) and reset the component to its initial state with no selection.

Additional information

  • I intend to submit a PR for this feature.
  • I have already implemented and/or tested this feature.
@Ericlm
Copy link

Ericlm commented Feb 25, 2025

You can use https://reka-ui.com/docs/components/combobox#cancel I think

@sebsobseb
Copy link
Contributor

You can use https://reka-ui.com/docs/components/combobox#cancel I think

This will simply clear the search term when you are searching, but not the actual underlying model value.

@maximepvrt maximepvrt reopened this Feb 26, 2025
@sebsobseb
Copy link
Contributor

Maybe interesting to mention that the same question for the Select component was asked before: #1237
But, not sure if the same principles apply to the Combobox.

@zernonia
Copy link
Member

Have you tried adding ComboboxItem with null value? 😁
https://stackblitz.com/edit/v8mrrgp1?file=src%2FApp.vue

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

4 participants