Skip to main content
Vuetify0 v1.0 is here
Vuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One
Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

createFilter API

A composable for filtering arrays of items based on search queries, supporting both primitive values and complex objects with customizable filtering logic.

Explore these related pages for additional context and usage patterns.

Functions

createFilter

(options?: FilterOptions) => E

Creates a filter context with pre-configured options.

createFilterContext

(_options?: FilterContextOptions) => ContextTrinity<E>

Creates a filter context with dependency injection support.

useFilter

(namespace?: string) => E

Returns the current filter context from dependency injection.

Options

customFilter

FilterFunction | undefined

keys

string[] | undefined

mode

FilterMode | undefined

Properties

mode

FilterMode

The filter mode

keys

string[] | undefined

Keys to filter on for object items

customFilter

FilterFunction | undefined

Custom filter function

query

ShallowRef<Primitive | Primitive[]>

Current query ref

Methods

apply

<T extends Z>(query: FilterQuery, items: MaybeRefOrGetter<T[]>) => FilterResult<T>

Apply filter to an array of items

Was this page helpful?

© 2016-1970 Vuetify, LLC
Services
Ctrl+/