Class BaseSearchInputGroup<T extends BaseSearchInputGroup<T>>

All Implemented Interfaces:
ElementAttributeMethods<HTMLElement, T>, ElementClassListMethods<HTMLElement, T>, ElementConsumerMethods<HTMLElement, T>, ElementContainerMethods<HTMLElement, T>, ElementEventMethods<HTMLElement, T>, ElementIdMethods<HTMLElement, T>, ElementQueryMethods<HTMLElement>, HTMLElementAttributeMethods<HTMLElement, T>, HTMLElementDataMethods<HTMLElement, T>, HTMLElementStyleMethods<HTMLElement, T>, HTMLElementVisibilityMethods<HTMLElement, T>, IsElement<HTMLElement>, TypedBuilder<HTMLElement, T>, Component, ComponentIcon<HTMLElement, T>, Validatable<HTMLElement, T>, HasValue<String>, OuiaSupport<HTMLElement, T>, Modifiers.Disabled<HTMLElement, T>, Modifiers.Plain<HTMLElement, T>
Direct Known Subclasses:
BaseFilterInputGroup, SearchInputGroup, SearchInputGroupTypeahead

public abstract class BaseSearchInputGroup<T extends BaseSearchInputGroup<T>> extends BaseTextInputGroup<T>
Base class for search input components within a TextInputGroup.

Provides core search input functionality, including a clear button and customizable utility visibility. For typeahead support with an attached menu, use SearchInputGroupTypeahead or FilterInputGroupTypeahead.

  • Method Details

    • noDefaultOnClear

      public T noDefaultOnClear()
      Removes the default behavior when the component is cleared. By default, the clear button clears the input field (w/o firing a change event).
    • showUtilitiesIf

      public T showUtilitiesIf(BiFunction<T,String,Boolean> visibility)
      Sets the visibility condition for the utility button. By default, the button is visible when the input field is not empty. The provided BiFunction determines whether the utility should be visible based on the current SearchInput instance and a String value.
      Parameters:
      visibility - a BiFunction that takes the SearchInput instance and a String value as arguments and returns a Boolean indicating whether the utility should be visible.
    • onClear

      public T onClear(ComponentHandler<T> onClear)
      Adds a handler to be executed when the clear action is pressed.
      Parameters:
      onClear - a ComponentHandler that defines the behavior to execute on a clear action.
    • value

      public T value(String value)
      Description copied from class: BaseTextInputGroup
      Overrides:
      value in class BaseTextInputGroup<T extends BaseSearchInputGroup<T>>
    • value

      public T value(String value, boolean fireEvent)
      Overrides:
      value in class BaseTextInputGroup<T extends BaseSearchInputGroup<T>>