Skip to main content

Function: filterGeneric()

function filterGeneric<T>(
item: T,
search?: string,
matchCriteria?: string[]): boolean

Filters a generic item based on the filter state.

The item is considered to match if any of the matchCriteria (described as JSONPath) matches the filter.search contents. Case matching is insensitive.

Type Parameters

Type ParameterDefault type
T extends objectobject

Parameters

ParameterTypeDescription
itemTThe item to filter.
search?string-
matchCriteria?string[]The JSONPath criteria to match.

Returns

boolean

Defined in

src/redux/filterSlice.ts:73