AutoCombobox

Combobox widget combined with Autocomplete widget which allows select item by typing.

Note

Difference between Autocomplete, AutoCombobox, and AutocompleteCombobox:
- Autocomplete is InputField with autocomplete feature.
- AutoCombobox is Combobox with the option to select items by typing, with it you can get selected items.
- AutocompleteCombobox is a wrapper for Autocomplete with the ability to select an action when user input is not valid.

Options

  • Autocomplete TAutocomplete

    ListView with items.

  • Combobox TCombobox

    Button to show and hide ListView on click.

  • AddItems bool

    Create a new item and add it to list if item not found with specified input. Requires overrided TItem Input2Item(string input) method.

  • KeepSelection bool

    Keep selected items for Autocomplete.DisplayListView.

Events

  • OnItemSelected UnityEvent<int, TItem>

    The event raised when item selected.

    Arguments: index of the selected item and selected item.

  • OnItemDeselected UnityEvent<int, TItem>

    The event raised when item deselected.

    Arguments: index of the deselected item and deselected item. | If an item associated with this index is removed the index can be invalid ( >= DataSouce.Count) or point to different item. | The item is not valid if list is cleared or selected item was removed.