Class FilterField

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.popover.Popover
com.vaadin.flow.component.grid.FilterField
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasAriaLabel, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.shared.HasThemeVariant<com.vaadin.flow.component.popover.PopoverVariant>, Serializable

public class FilterField extends com.vaadin.flow.component.popover.Popover
Filter field component that can be used to filter grid columns.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.vaadin.flow.component.popover.Popover

    com.vaadin.flow.component.popover.Popover.OpenedChangeEvent
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add an apply filter listener.
    void
    addFilterComponent(com.vaadin.flow.component.Component filterComponent)
    Add a filter component to the filter field.
    void
    Apply the filter.
    findComponent(com.vaadin.flow.component.Component component)
    Returns the FilterField that contains the component, if any.
    com.vaadin.flow.component.Component
    Get the filter component.
    boolean
    Check if the filter is empty.
    void
    Reset the filter.

    Methods inherited from class com.vaadin.flow.component.popover.Popover

    addOpenedChangeListener, close, getFocusDelay, getFor, getHideDelay, getHoverDelay, getOverlayRole, getPosition, getRole, getStyle, getTarget, isAutofocus, isBackdropVisible, isCloseOnEsc, isCloseOnOutsideClick, isModal, isOpened, isOpenOnClick, isOpenOnFocus, isOpenOnHover, open, setAutofocus, setBackdropVisible, setCloseOnEsc, setCloseOnOutsideClick, setDefaultFocusDelay, setDefaultHideDelay, setDefaultHoverDelay, setFocusDelay, setFor, setHeight, setHideDelay, setHoverDelay, setModal, setModal, setOpened, setOpenOnClick, setOpenOnFocus, setOpenOnHover, setOverlayRole, setPosition, setRole, setTarget, setWidth

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasAriaLabel

    getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledBy

    Methods inherited from interface com.vaadin.flow.component.HasComponents

    add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAll

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.HasTheme

    addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName

    Methods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant

    addThemeVariants, removeThemeVariants, setThemeVariant, setThemeVariants, setThemeVariants
  • Constructor Details

    • FilterField

      public FilterField()
  • Method Details

    • applyFilter

      public void applyFilter()
      Apply the filter.
    • resetFilter

      public void resetFilter()
      Reset the filter.
    • addFilterComponent

      public void addFilterComponent(com.vaadin.flow.component.Component filterComponent)
      Add a filter component to the filter field.
      Parameters:
      filterComponent - the filter component to add
    • getFilterComponent

      public com.vaadin.flow.component.Component getFilterComponent()
      Get the filter component.
      Returns:
      the filter component
    • isEmptyFilter

      public boolean isEmptyFilter()
      Check if the filter is empty.
      Returns:
      true if the filter is empty, false otherwise
    • addApplyFilterListener

      public void addApplyFilterListener(ApplyFilterListener applyFilterListener)
      Add an apply filter listener.
      Parameters:
      applyFilterListener - the apply filter listener to add
    • findComponent

      public static Optional<FilterField> findComponent(com.vaadin.flow.component.Component component)
      Returns the FilterField that contains the component, if any.
      Parameters:
      component - the component to find the FilterField for
      Returns:
      the FilterField that contains the component, if any