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

Allow typeahead text to be automatically cleared when an item is selected, else manually cleared via API? #104

Open
andrew-pane opened this issue Apr 29, 2022 · 0 comments

Comments

@andrew-pane
Copy link

andrew-pane commented Apr 29, 2022

When typeahead text is entered by the user, is there a way to clear out their text when they choose an item from the list, either automatically or via an API call?

For example, I type "Andrew" and pick my name from the list, but "Andrew" still hangs around in the input text unless I tab away from the dialog and come back. I would like to clear that text as soon as the user selects an item from the list.

As a workaround, I tried adding a ValueChangeListener that would clear the ComboBox and then re-select the chosen values, but I only seem to be able to be able to clear/reset the selected values, but the user text hangs around. In the end I've managed to get this working by recycling the entire MultiselectComboBox object with a new instance and then populating it with the values from the first instance, but this seems clumsy and causes some flicker on screen.

(BTW, great component!)

@andrew-pane andrew-pane changed the title Allow user text to be automatically cleared when an item is selected, else manually cleared via API? Allow typeahead text to be automatically cleared when an item is selected, else manually cleared via API? Apr 29, 2022
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

1 participant