Skip to content

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

Open
@andrew-pane

Description

@andrew-pane

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!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions