@empathyco/x-components
Version:
Empathy X Components
32 lines • 1.03 kB
TypeScript
import type { Filter } from '@empathyco/x-types';
import { BaseFilterEntityModifier } from './types';
/**
* A dictionary with information about whether to keep or remove sticky filters.
*/
interface Metadata {
keepSticky: boolean;
}
/**
* Allows to persist a filter between different queries.
*
* @remarks when using this modifier along with others, make sure this is the first one defined.
*
* @internal
*/
export declare class StickyModifier extends BaseFilterEntityModifier<Metadata> {
/**
* Deselects the passed filter unless the metadata has the `keepSticky` flag enabled.
*
* @param filter - The filter to deselect.
* @param metadata - Additional information to prevent a filter from being deselected.
*/
deselect(filter: Filter, metadata?: Metadata): void;
/**
* Selects the passed filter and stores it as sticky.
*
* @param filter - The filter to select.
*/
select(filter: Filter): void;
}
export {};
//# sourceMappingURL=sticky.modifier.d.ts.map