Skip to content

FilterGroup

Overview

Presentation host for a model list view's filter controls. It renders the add-filter FilterMenu (whose trigger teleports into the toolbar) from the caller-resolved filterables / filterableDetails / validFilterables and, when filters are active, a strip of removable FilterChips plus a Clear filters control. Resolving which fields are filterable (typically via useViewList), restoring the active-filter list from the URL, mirroring it to query parameters, and persisting it as a preference are all the caller's responsibility; this component only renders the v-model list and threads add/edit/remove edits back through it.

Theme entry: FilterGroup

Props

NameTypeRequiredDefaultDescription
themeOverrideString|Object|ArraynullA partial theme object merged with the component's default theme; accepts a class string, class array, or theme object.
appstringyesDjango app label. Not used to discover filterable fields (see filterables below); used for field/widget component override resolution and passed to descendants (e.g. FilterFieldForm) for choice-value fetching.
modelstringyesDjango model name. See app above for what this is (and isn't) used for.
viewstringyesView name, forwarded the same way as app/model.
filterablesarrayyesResolved filterable field names for this app/model/view (e.g. useViewList's filter.filterables), including fields with no usable filter type or that are server-hidden. FilterGroup does not fetch, merge, or recompute this itself.
filterableDetailsobjectyesResolved per-field filter details (e.g. useViewList's filter.filterableDetails).
validFilterablesarrayyesfilterables narrowed to fields with a usable, non-hidden filter type (e.g. useViewList's filter.validFilterables); the field list rendered as addable/editable.
erroredbooleanfalseWhen true, the filter group is in an error state, enabling error display.
errorobjectnullError object to display; only rendered when it is a ListFilterError instance.
triggerTargetobject|stringnullElement (or selector) in the host toolbar that the add-filter trigger teleports into.
hostedbooleanfalseWhen true, the chips render as a bare subgroup (no band chrome) for hosting inside a shared ConstraintsBar; the group keeps its own Clear filters control. When false (default), the chips render as a self-contained strip.

Slots

slotName

Scoped slot.

Bindings

NameDescription
name

filter-group-error-display

Slot.

Events

NameDescription
hide-filter-formForwarded from the add-filter menu or a filter chip's edit popover when it should close.

Full event reference

Source

client/lib/form/filter/FilterGroup.vue

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2