Skip to content

Filtering

QTableFiltering edits a Query Kit-compatible Filtering value. It owns the editor state and emits immutable replacements; the application serializes the result for its API.

Empty filtering popover

Configured filtering popover

Inputs and state

Prop/modelDefaultDescription
v-model:filteringrequiredFilteringMode.Intersect (AND) or FilteringMode.Union (OR) plus filters.
fieldsrequiredFilterField[] definitions for the available editors.
iconi-tabler-filterTrigger icon.
shortcutstrueEnables Shift + F.
textsExplicit text overrides, ahead of i18n and English defaults.
ui.contentExtra classes for the Nuxt UI popover content.

The trigger changes to the primary color when filters are active. Disabled fields are excluded from the add selector.

Popover actions

  • Change filter mode — the header button switches between AND and OR while retaining every filter.
  • Clear filters — the header action resets the value to an empty AND filter group.
  • Add filter — choose an enabled field and press the plus button. The initial operator and value are derived from its type.
  • Edit a boolean — the default checkbox writes true or false.
  • Edit a number — choose =, , >, , <, or , then enter a number.
  • Edit enum and select fields — choose or and select multiple values. Enum fields may provide a custom component; select fields require one.
  • Remove filter — press the remove button next to an entry.
vue
<QTableFiltering v-model:filtering="filtering" :fields="filterFields" />

Slots

SlotUseful slot props
triggeropen, toggle, active
headerfiltering, clear, toggleMode
itemsfilters, remove, update
itemfilter, field, remove, update
addfields, add

Use the item slot for an entirely custom per-field editor; use a field's component when only its value input differs.

Released under the MIT License.