UNPKG

@future-widget-lab/ui-filters

Version:

A set of primitives for handling filters through search parameters in React applications.

28 lines (27 loc) 852 B
import type { Filters, FilterValue } from '../../types/filters.type'; export type RemoveFilterValueOptions = { /** * @description * The filters collection. */ filters: Filters; /** * @description * The name of the filter which should be updated. */ name: string; /** * @description * The value that is being removed from the given filter name. */ value: FilterValue; }; /** * @description * Use this helper to remove an existing filter value from the specified filter name. * * Comparison checks are performed as follows: * - Object values are serialized into strings for accurate comparison. * - Primitives values (strings, numbers, etc.) are compared directly without serialization. */ export declare const removeFilterValue: (options: RemoveFilterValueOptions) => Filters;