Package com.vaadin.flow.component.grid
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddApplyFilterListener(ApplyFilterListener applyFilterListener) Add an apply filter listener.voidaddFilterComponent(com.vaadin.flow.component.Component filterComponent) Add a filter component to the filter field.voidApply the filter.static Optional<FilterField> findComponent(com.vaadin.flow.component.Component component) Returns the FilterField that contains the component, if any.com.vaadin.flow.component.ComponentGet the filter component.booleanCheck if the filter is empty.voidReset 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, setWidthMethods 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, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasAriaLabel
getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledByMethods inherited from interface com.vaadin.flow.component.HasComponents
add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAllMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods 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
Add an apply filter listener.- Parameters:
applyFilterListener- the apply filter listener to add
-
findComponent
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
-