menuFilterField

The menuFilterField component filters main-menu items by their text labels.

XML Element

menuFilterField

Java Class

MenuFilterField

Overview

Menu filter field

Basics

Place menuFilterField in the main view and set its required menu attribute to the id of the listMenu it should filter. As users type, the field limits the visible menu entries according to the configured filterMode:

<menuFilterField placeholder="Search..."
                 classNames="ms-s me-s"
                 menu="menu"/> (1)
<nav id="navigation"
     classNames="jmix-main-view-navigation"
     ariaLabel="msg://navigation.ariaLabel">
    <listMenu id="menu"/>
</nav>
1 References the listMenu component that supplies the items to filter.
The component does not support filtering horizontalMenu.

Theme Variants

Use the themeNames attribute to change the field’s appearance.

Variant Description Supported By

align-left

Aligns the field value to the left side.

Aura, Lumo

align-center

Centers the field value.

Aura, Lumo

align-right

Aligns the field value to the right side.

Aura, Lumo

align-start

Aligns the field value to the start side, taking the current text direction into account.

Aura

align-end

Aligns the field value to the end side, taking the current text direction into account.

Aura

helper-above-field

Renders the helper text above the field, below the label.

Aura, Lumo

small

Makes the component smaller.

Aura, Lumo

Attributes

The following attributes are specific to menuFilterField:

Name Description Default

filterMode

Controls whether matching is case-sensitive.

CASE_INSENSITIVE

menu

References the listMenu component to filter.

clearButtonVisible

Shows a button that clears the current value.

false

autoselect

Selects the complete value when the field receives focus.

false

The following shared attributes are supported by menuFilterField:

Handlers

The following shared handlers are supported by menuFilterField: