Class MultiTypeahead
java.lang.Object
org.patternfly.component.ComponentDelegate<HTMLElement, MultiTypeahead>
org.patternfly.component.menu.MultiTypeahead
- All Implemented Interfaces:
Attachable,ElementAttributeMethods<HTMLElement, MultiTypeahead>,ElementClassListMethods<HTMLElement, MultiTypeahead>,ElementConsumerMethods<HTMLElement, MultiTypeahead>,ElementContainerMethods<HTMLElement, MultiTypeahead>,ElementEventMethods<HTMLElement, MultiTypeahead>,ElementIdMethods<HTMLElement, MultiTypeahead>,ElementQueryMethods<HTMLElement>,HTMLElementAttributeMethods<HTMLElement, MultiTypeahead>,HTMLElementDataMethods<HTMLElement, MultiTypeahead>,HTMLElementStyleMethods<HTMLElement, MultiTypeahead>,HTMLElementVisibilityMethods<HTMLElement, MultiTypeahead>,IsElement<HTMLElement>,TypedBuilder<HTMLElement, MultiTypeahead>,Component,Expandable<HTMLElement, MultiTypeahead>,Modifiers.Disabled<HTMLElement, MultiTypeahead>
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.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionapplyTo(Consumer<MenuToggle> consumer) Provides access to the underlying menu toggle using a fluent API stylevoidattach(MutationRecord mutationRecord) voidclear()voidclear(boolean fireEvent) voidcollapse(boolean fireEvent) voiddetach(MutationRecord mutationRecord) disabled(boolean disabled) voidexpand(boolean fireEvent) flip(boolean flip) booleanmenu()static MultiTypeaheadmultiTypeahead(String id, String placeholder) Creates a newMultiTypeaheadcomponent with aMenuToggleof typeMenuToggleType.typeaheadand aFilterInput.static MultiTypeaheadmultiTypeahead(MenuToggle menuToggle) Creates a newMultiTypeaheadcomponent with the givenMenuToggle.onLoaded(ComponentHandler<MultiTypeahead> loadedHandler) onNoResults(Function<String, MenuItem> noResults) Defines the behavior when no results are found during a search.onSearch(SearchFilter searchFilter) Configures the search behavior for this typeahead.onToggle(ToggleHandler<MultiTypeahead> toggleHandler) voidselectIdentifiers(List<String> identifiers) voidselectIdentifiers(List<String> identifiers, boolean fireEvent) voidselectItems(List<MenuItem> items) voidselectItems(List<MenuItem> items, boolean fireEvent) stayOpen()Specifies a condition that determines whether the menu should remain open when an event occurs.that()voidunselectIdentifiers(List<String> identifiers) voidunselectIdentifiers(List<String> identifiers, boolean fireEvent) voidunselectItems(List<MenuItem> items) voidunselectItems(List<MenuItem> items, boolean fireEvent) zIndex(int zIndex) Methods inherited from class org.patternfly.component.ComponentDelegate
componentType, elementMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.elemento.ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface org.jboss.elemento.ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface org.jboss.elemento.ElementConsumerMethods
apply, runMethods inherited from interface org.jboss.elemento.ElementContainerMethods
add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface org.jboss.elemento.ElementEventMethods
on, on, onMethods inherited from interface org.jboss.elemento.ElementIdMethods
id, uniqueIdMethods inherited from interface org.jboss.elemento.ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface org.patternfly.component.Expandable
collapse, expand, expanded, toggle, toggleMethods inherited from interface org.jboss.elemento.HTMLElementAttributeMethods
titleMethods inherited from interface org.jboss.elemento.HTMLElementDataMethods
dataMethods inherited from interface org.jboss.elemento.HTMLElementStyleMethods
style, style, style, style, style, styleMethods inherited from interface org.jboss.elemento.HTMLElementVisibilityMethods
hiddenMethods inherited from interface org.patternfly.style.Modifiers.Disabled
disabled
-
Method Details
-
multiTypeahead
Creates a newMultiTypeaheadcomponent with aMenuToggleof typeMenuToggleType.typeaheadand aFilterInput. -
that
-
onNoResults
Defines the behavior when no results are found during a search. This method allows setting aFunctionthat takes a search query as input and provides aMenuItemto be displayed when no matching results are found.By default, a "No results found" message is displayed.
- Parameters:
noResults- aFunctionthat accepts aStringparameter representing the search query, and returns aMenuItemto display for no results.- Returns:
- the
MultiTypeaheadinstance for method chaining.
-
clear
public void clear() -
clear
public void clear(boolean fireEvent) -
selectIdentifiers
-
selectIdentifiers
-
selectItems
-
selectItems
-
unselectIdentifiers
-
unselectIdentifiers
-
unselectItems
-
unselectItems
-
attach
- Specified by:
attachin interfaceAttachable
-
detach
- Specified by:
detachin interfaceAttachable
-
applyTo
Provides access to the underlying menu toggle using a fluent API style -
disabled
- Specified by:
disabledin interfaceModifiers.Disabled<HTMLElement, B extends TypedBuilder<HTMLElement, B>>
-
isDisabled
public boolean isDisabled()- Specified by:
isDisabledin interfaceModifiers.Disabled<HTMLElement, B extends TypedBuilder<HTMLElement, B>>
-
flip
-
placement
-
stayOpen
-
stayOpen
Specifies a condition that determines whether the menu should remain open when an event occurs. -
zIndex
-
ariaLabel
-
onLoaded
-
onToggle
-
collapse
public void collapse(boolean fireEvent) - Specified by:
collapsein interfaceExpandable<HTMLElement, B extends TypedBuilder<HTMLElement, B>>
-
expand
public void expand(boolean fireEvent) - Specified by:
expandin interfaceExpandable<HTMLElement, B extends TypedBuilder<HTMLElement, B>>
-