You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!)
The text was updated successfully, but these errors were encountered:
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
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!)
The text was updated successfully, but these errors were encountered: