use/useFilterForm
Overview
Manages reactive filter form values, translating field-type-specific initial values and range fields into URL-ready query parameters.
Methods
- buildFilterFromQuery - Build an active-filter object from a URL query, or
nullwhen the field has no value in the query. - filtersToParams - Reduce an active-filter list to the flat query-param object the URL and list request carry.
- getFilterParams - Resolve the URL query-param key(s) a filter writes to.
- getFilterQueryValue - Read a filter's active value out of a URL query object, in the shape the filter form submits: a
{ [suffix]: value }object for suffix/range filters, or the bare param value otherwise. - getRepeatedFilterParams - The query keys whose array values the list request sends as repeated keys: the keys of every filter whose type sets
repeatedKeyin FilterFieldMappings. - isRangeFilter - Whether a filter renders as a range: its value mapping is a range and its metadata declares the two boundary suffixes.
- useFilterField - A Vue composable that creates reactive state for a single filter field based on its type definition.
Types
UseFilterFieldProps
UseFilterFieldRawState
Source
client/lib/use/useFilterForm.js:1