Interface Typeahead<B>

Type Parameters:
B - the builder type for method chaining
All Known Implementing Classes:
FilterInputGroupTypeahead, MultiSelectTypeahead, SearchInputGroupTypeahead, SingleSelectTypeahead

public interface Typeahead<B>
Interface for components that combine a text input with a menu to provide typeahead/autocomplete behavior. A typeahead component filters or refreshes its menu items based on user input.

The typeahead behavior is driven by a RefreshStrategy that evaluates each input change and returns a Decision:

  • Method Summary

    Modifier and Type
    Method
    Description
    filter(SearchFilter searchFilter)
    Sets the filter used to match existing menu items against the current input value.
    Adds a handler called when the menu has finished loading its items.
    Configures the behavior for generating a "no results" menu item when no matching items are found.
    Adds a handler called when the typeahead menu is expanded or collapsed.
    Sets the refresh strategy for asynchronously loaded items.
  • Method Details

    • refreshOn

      B refreshOn(RefreshStrategy strategy)
      Sets the refresh strategy for asynchronously loaded items.
    • filter

      B filter(SearchFilter searchFilter)
      Sets the filter used to match existing menu items against the current input value. Defaults to SearchFilter.contains().
    • onNoResults

      B onNoResults(NoResults noResults)
      Configures the behavior for generating a "no results" menu item when no matching items are found.
    • onLoaded

      B onLoaded(ComponentHandler<B> handler)
      Adds a handler called when the menu has finished loading its items.
    • onToggle

      B onToggle(ToggleHandler<B> handler)
      Adds a handler called when the typeahead menu is expanded or collapsed.