@popmenu/table 0.91.0 → 0.93.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,4 +42,6 @@ export interface TableProps<T = unknown> {
42
42
  Empty?: () => JSX.Element;
43
43
  /** A string used to construct ids and tags used throughout the table for tagging inner elements. ie: data-tour-id. */
44
44
  idBase?: string;
45
+ /** Controls which filter should be used for the application, automatic or manual. */
46
+ stageFilterSelections?: boolean;
45
47
  }
@@ -1,3 +1,16 @@
1
1
  /// <reference types="react" />
2
- import { Table } from '@tanstack/react-table';
3
- export declare const TableContext: import("react").Context<Table<any>>;
2
+ import { ColumnFilter, Table } from '@tanstack/react-table';
3
+ export declare type StagedColumnFilter = {
4
+ update: (columnId: string, value: string | Array<string>) => void;
5
+ get: (columnId: string) => string | Array<string> | undefined;
6
+ clear: () => void;
7
+ delete: (columnFilter: ColumnFilter) => void;
8
+ exist: () => boolean;
9
+ };
10
+ declare type TabelContextValue = {
11
+ table: Table<any>;
12
+ stagedColumnFilters: StagedColumnFilter;
13
+ stageFilterSelections: boolean | undefined;
14
+ };
15
+ export declare const TableContext: import("react").Context<TabelContextValue>;
16
+ export {};
@@ -1 +1,2 @@
1
1
  export { useColumnFilters } from './useColumnFilters';
2
+ export { useStagedColumnFilters } from './useStagedColumnFilters';
@@ -0,0 +1,8 @@
1
+ import { ColumnFilter } from '@tanstack/react-table';
2
+ export declare const useStagedColumnFilters: () => {
3
+ update: (columnId: string, value: string | Array<string>) => void;
4
+ get: (columnId: string) => string | string[] | undefined;
5
+ clear: () => void;
6
+ delete: (columnFilter: ColumnFilter) => void;
7
+ exist: () => boolean;
8
+ };