forked from neolution-ch/react-data-table
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTableState.ts
More file actions
31 lines (28 loc) · 706 Bytes
/
TableState.ts
File metadata and controls
31 lines (28 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { ColumnPinningState, CoreOptions } from "@tanstack/react-table";
import { SortingState } from "./SortingState";
/**
* Object type implementation
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type FilterModel = { [k: string]: any };
/**
* The table sorting state
*/
interface TableState<TData, TFilter extends FilterModel> extends Pick<
CoreOptions<TData>["state"],
"pagination" | "rowSelection" | "expanded"
> {
/**
* The column filters state
*/
columnFilters?: TFilter;
/**
* The sorting state
*/
sorting?: SortingState<TData>;
/**
* The column pinning state
*/
columnPinning?: ColumnPinningState;
}
export { TableState, FilterModel };