Class PopperMultiTypeahead

All Implemented Interfaces:
Attachable, ElementAttributeMethods<HTMLElement, PopperMultiTypeahead>, ElementClassListMethods<HTMLElement, PopperMultiTypeahead>, ElementConsumerMethods<HTMLElement, PopperMultiTypeahead>, ElementContainerMethods<HTMLElement, PopperMultiTypeahead>, ElementEventMethods<HTMLElement, PopperMultiTypeahead>, ElementIdMethods<HTMLElement, PopperMultiTypeahead>, ElementQueryMethods<HTMLElement>, HTMLElementAttributeMethods<HTMLElement, PopperMultiTypeahead>, HTMLElementDataMethods<HTMLElement, PopperMultiTypeahead>, HTMLElementStyleMethods<HTMLElement, PopperMultiTypeahead>, HTMLElementVisibilityMethods<HTMLElement, PopperMultiTypeahead>, IsElement<HTMLElement>, TypedBuilder<HTMLElement, PopperMultiTypeahead>, Component, Expandable<HTMLElement, PopperMultiTypeahead>, PopperTypeahead<PopperMultiTypeahead>, Modifiers.Disabled<HTMLElement, PopperMultiTypeahead>

@Deprecated(since="0.7.0", forRemoval=true) public class PopperMultiTypeahead extends ComponentDelegate<HTMLElement, PopperMultiTypeahead> implements PopperTypeahead<PopperMultiTypeahead>
Deprecated, for removal: This API element is subject to removal in a future version.
This implementation uses the Popper.js API, which is due to be removed soon. Use MultiTypeahead instead.
A typeahead is a select variant that replaces the typical button toggle for opening the select menu with a text input and button toggle combo. As a user enters characters into the text input, the menu options will be filtered to match.
  • Method Details

    • multiTypeahead

      public static PopperMultiTypeahead multiTypeahead(String id, String placeholder)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new PopperMultiTypeahead component with a MenuToggle of type MenuToggleType.typeahead and a FilterInput.
    • multiTypeahead

      public static PopperMultiTypeahead multiTypeahead(BaseFilterInput<?> filterInput)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new PopperMultiTypeahead component with a MenuToggle of type MenuToggleType.typeahead and the specified BaseFilterInput.
      Parameters:
      filterInput - the BaseFilterInput instance used to configure the typeahead component with filtering and search capabilities
      Returns:
      a new PopperMultiTypeahead instance configured with the given filter input
    • add

      public PopperMultiTypeahead add(Menu menu)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • allowNewItems

      public PopperMultiTypeahead allowNewItems(Function<String,String> prompt, Function<String, Promise<MenuItem>> createItem)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PopperTypeahead
      Allows the creation of new menu items based on user input. This method enables a typeahead component to provide functionality for dynamically adding custom items when the user-provided input does not match any existing items.
      Specified by:
      allowNewItems in interface PopperTypeahead<PopperMultiTypeahead>
      Parameters:
      prompt - a Function that takes a String input representing the user's data and returns a String response, typically used to prompt the user or display a message.
      createItem - a Function that takes a String input representing the user's data and returns a Promise of a MenuItem, representing the newly created item.
      Returns:
      an instance of the enclosing type, enabling method chaining for further configuration.
    • that

      public PopperMultiTypeahead that()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      that in interface TypedBuilder<HTMLElement, PopperMultiTypeahead>
    • onSearch

      public PopperMultiTypeahead onSearch(SearchFilter searchFilter)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PopperTypeahead
      Configures the search behavior for this typeahead.
      Specified by:
      onSearch in interface PopperTypeahead<PopperMultiTypeahead>
      Parameters:
      searchFilter - a SearchFilter that defines the search logic. The first parameter is a MenuItem representing a menu item, and the second parameter is a String representing the search query. The predicate should return true for items matching the search.
      Returns:
      the PopperSingleTypeahead instance for method chaining.
    • onNoResults

      public PopperMultiTypeahead onNoResults(NoResults noResults)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PopperTypeahead
      Configures the behavior for generating a "no results" menu item when no matching items are found in the menu list for the given input text.
      Specified by:
      onNoResults in interface PopperTypeahead<PopperMultiTypeahead>
      Parameters:
      noResults - a NoResults implementation responsible for defining how the "no results" menu item is created and displayed when no matches are found.
      Returns:
      the instance of the current type enabling method chaining.
    • clear

      public void clear()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • clear

      public void clear(boolean fireEvent)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • selectIdentifiers

      public void selectIdentifiers(List<String> identifiers)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • selectIdentifiers

      public void selectIdentifiers(List<String> identifiers, boolean fireEvent)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • selectItems

      public void selectItems(List<MenuItem> items)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • selectItems

      public void selectItems(List<MenuItem> items, boolean fireEvent)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • attach

      public void attach(MutationRecord mutationRecord)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      attach in interface Attachable
    • detach

      public void detach(MutationRecord mutationRecord)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      detach in interface Attachable
    • addMenu

      public PopperMultiTypeahead addMenu(Menu menu)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • applyToMenuToggle

      public PopperMultiTypeahead applyToMenuToggle(Consumer<MenuToggle> consumer)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Provides access to the underlying menu toggle using a fluent API style
    • disabled

      public PopperMultiTypeahead disabled(boolean disabled)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      disabled in interface Modifiers.Disabled<HTMLElement, B extends TypedBuilder<HTMLElement, B>>
    • isDisabled

      public boolean isDisabled()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      isDisabled in interface Modifiers.Disabled<HTMLElement, B extends TypedBuilder<HTMLElement, B>>
    • flip

      public PopperMultiTypeahead flip(boolean flip)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • placement

      public PopperMultiTypeahead placement(PopperPlacement placement)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • stayOpen

      public PopperMultiTypeahead stayOpen()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • stayOpen

      public PopperMultiTypeahead stayOpen(Predicate<Event> stayOpen)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specifies a condition that determines whether the menu should remain open when an event occurs.
      Parameters:
      stayOpen - a Predicate that evaluates an Event to determine if the menu remains open.
      Returns:
      the current instance with the condition applied, enabling method chaining.
    • zIndex

      public PopperMultiTypeahead zIndex(int zIndex)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • ariaLabel

      public PopperMultiTypeahead ariaLabel(String label)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • onLoaded

      Deprecated, for removal: This API element is subject to removal in a future version.
    • onToggle

      public PopperMultiTypeahead onToggle(ToggleHandler<PopperMultiTypeahead> toggleHandler)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • collapse

      public void collapse(boolean fireEvent)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      collapse in interface Expandable<HTMLElement, B extends TypedBuilder<HTMLElement, B>>
    • expand

      public void expand(boolean fireEvent)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      expand in interface Expandable<HTMLElement, B extends TypedBuilder<HTMLElement, B>>