compote-ui
Version:
An opinionated UI component library for Svelte, built on top of [Ark UI](https://ark-ui.com) with additional components and features not available in the core Ark UI library.
18 lines (17 loc) • 1.02 kB
TypeScript
import type { ColumnFiltersState } from '@tanstack/svelte-table';
/**
* A per-column counter that goes up on every change to that column's filter value. Unlike
* the value itself it never returns to an earlier state, so a filter cleared and then set
* back to the same value still reads as changed (the ABA case a value comparison misses).
*/
export declare class FilterRevisions {
#private;
get(columnId: string): number;
bump(columnIds: string[]): void;
}
/** Ids of the columns whose filter value differs (by reference) between two filter states. */
export declare function changedFilterIds(prev: ColumnFiltersState, next: ColumnFiltersState): string[];
/** Links a table to its filter revisions (done by `createTable`). */
export declare function registerFilterRevisions(table: object, revisions: FilterRevisions): void;
/** The filter revisions of a table made by `createTable`; undefined for any other table. */
export declare function getFilterRevisions(table: object): FilterRevisions | undefined;