@tanstack/table-core 9.0.0-alpha.47 → 9.0.0-alpha.48
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.
- package/README.md +10 -0
- package/dist/core/cells/coreCellsFeature.utils.cjs +11 -8
- package/dist/core/cells/coreCellsFeature.utils.cjs.map +1 -1
- package/dist/core/cells/coreCellsFeature.utils.d.cts +11 -8
- package/dist/core/cells/coreCellsFeature.utils.d.ts +11 -8
- package/dist/core/cells/coreCellsFeature.utils.js +11 -8
- package/dist/core/cells/coreCellsFeature.utils.js.map +1 -1
- package/dist/core/columns/coreColumnsFeature.types.d.cts +7 -6
- package/dist/core/columns/coreColumnsFeature.types.d.ts +7 -6
- package/dist/core/columns/coreColumnsFeature.utils.cjs +37 -27
- package/dist/core/columns/coreColumnsFeature.utils.cjs.map +1 -1
- package/dist/core/columns/coreColumnsFeature.utils.d.cts +37 -27
- package/dist/core/columns/coreColumnsFeature.utils.d.ts +37 -27
- package/dist/core/columns/coreColumnsFeature.utils.js +37 -27
- package/dist/core/columns/coreColumnsFeature.utils.js.map +1 -1
- package/dist/core/headers/coreHeadersFeature.types.d.cts +6 -4
- package/dist/core/headers/coreHeadersFeature.types.d.ts +6 -4
- package/dist/core/headers/coreHeadersFeature.utils.cjs +23 -18
- package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
- package/dist/core/headers/coreHeadersFeature.utils.d.cts +23 -18
- package/dist/core/headers/coreHeadersFeature.utils.d.ts +23 -18
- package/dist/core/headers/coreHeadersFeature.utils.js +23 -18
- package/dist/core/headers/coreHeadersFeature.utils.js.map +1 -1
- package/dist/core/row-models/coreRowModelsFeature.utils.cjs +48 -36
- package/dist/core/row-models/coreRowModelsFeature.utils.cjs.map +1 -1
- package/dist/core/row-models/coreRowModelsFeature.utils.d.cts +48 -36
- package/dist/core/row-models/coreRowModelsFeature.utils.d.ts +48 -36
- package/dist/core/row-models/coreRowModelsFeature.utils.js +48 -36
- package/dist/core/row-models/coreRowModelsFeature.utils.js.map +1 -1
- package/dist/core/rows/coreRowsFeature.types.d.cts +4 -4
- package/dist/core/rows/coreRowsFeature.types.d.ts +4 -4
- package/dist/core/rows/coreRowsFeature.utils.cjs +34 -28
- package/dist/core/rows/coreRowsFeature.utils.cjs.map +1 -1
- package/dist/core/rows/coreRowsFeature.utils.d.cts +34 -28
- package/dist/core/rows/coreRowsFeature.utils.d.ts +34 -28
- package/dist/core/rows/coreRowsFeature.utils.js +34 -28
- package/dist/core/rows/coreRowsFeature.utils.js.map +1 -1
- package/dist/core/table/coreTablesFeature.types.d.cts +6 -2
- package/dist/core/table/coreTablesFeature.types.d.ts +6 -2
- package/dist/core/table/coreTablesFeature.utils.cjs +2 -2
- package/dist/core/table/coreTablesFeature.utils.cjs.map +1 -1
- package/dist/core/table/coreTablesFeature.utils.d.cts +2 -2
- package/dist/core/table/coreTablesFeature.utils.d.ts +2 -2
- package/dist/core/table/coreTablesFeature.utils.js +2 -2
- package/dist/core/table/coreTablesFeature.utils.js.map +1 -1
- package/dist/features/column-faceting/columnFacetingFeature.types.d.cts +16 -10
- package/dist/features/column-faceting/columnFacetingFeature.types.d.ts +16 -10
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs +26 -18
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs.map +1 -1
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.cts +26 -18
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +26 -18
- package/dist/features/column-faceting/columnFacetingFeature.utils.js +26 -18
- package/dist/features/column-faceting/columnFacetingFeature.utils.js.map +1 -1
- package/dist/features/column-filtering/columnFilteringFeature.types.d.cts +21 -11
- package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +21 -11
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs +39 -28
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs.map +1 -1
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +39 -28
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +39 -28
- package/dist/features/column-filtering/columnFilteringFeature.utils.js +39 -28
- package/dist/features/column-filtering/columnFilteringFeature.utils.js.map +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.types.d.cts +18 -14
- package/dist/features/column-grouping/columnGroupingFeature.types.d.ts +18 -14
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs +55 -43
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs.map +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +55 -43
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +55 -43
- package/dist/features/column-grouping/columnGroupingFeature.utils.js +55 -43
- package/dist/features/column-grouping/columnGroupingFeature.utils.js.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.types.d.cts +14 -5
- package/dist/features/column-ordering/columnOrderingFeature.types.d.ts +14 -5
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs +30 -23
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +30 -23
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +30 -23
- package/dist/features/column-ordering/columnOrderingFeature.utils.js +30 -23
- package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.types.d.cts +43 -31
- package/dist/features/column-pinning/columnPinningFeature.types.d.ts +43 -31
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs +111 -91
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +111 -91
- package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +111 -91
- package/dist/features/column-pinning/columnPinningFeature.utils.js +111 -91
- package/dist/features/column-pinning/columnPinningFeature.utils.js.map +1 -1
- package/dist/features/column-resizing/columnResizingFeature.types.d.cts +9 -9
- package/dist/features/column-resizing/columnResizingFeature.types.d.ts +9 -9
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs +28 -19
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs.map +1 -1
- package/dist/features/column-resizing/columnResizingFeature.utils.d.cts +28 -19
- package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +28 -19
- package/dist/features/column-resizing/columnResizingFeature.utils.js +28 -19
- package/dist/features/column-resizing/columnResizingFeature.utils.js.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.types.d.cts +19 -12
- package/dist/features/column-sizing/columnSizingFeature.types.d.ts +19 -12
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs +52 -41
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +52 -41
- package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +52 -41
- package/dist/features/column-sizing/columnSizingFeature.utils.js +52 -41
- package/dist/features/column-sizing/columnSizingFeature.utils.js.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.cts +16 -13
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +16 -13
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs +54 -42
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +54 -42
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +54 -42
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js +54 -42
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js.map +1 -1
- package/dist/features/global-filtering/globalFilteringFeature.types.d.cts +10 -5
- package/dist/features/global-filtering/globalFilteringFeature.types.d.ts +10 -5
- package/dist/features/global-filtering/globalFilteringFeature.utils.cjs +20 -14
- package/dist/features/global-filtering/globalFilteringFeature.utils.cjs.map +1 -1
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +20 -14
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +20 -14
- package/dist/features/global-filtering/globalFilteringFeature.utils.js +20 -14
- package/dist/features/global-filtering/globalFilteringFeature.utils.js.map +1 -1
- package/dist/features/row-expanding/rowExpandingFeature.types.d.cts +16 -15
- package/dist/features/row-expanding/rowExpandingFeature.types.d.ts +16 -15
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs +56 -41
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs.map +1 -1
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.cts +56 -41
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.ts +56 -41
- package/dist/features/row-expanding/rowExpandingFeature.utils.js +56 -41
- package/dist/features/row-expanding/rowExpandingFeature.utils.js.map +1 -1
- package/dist/features/row-pagination/rowPaginationFeature.types.d.cts +19 -12
- package/dist/features/row-pagination/rowPaginationFeature.types.d.ts +19 -12
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs +49 -32
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs.map +1 -1
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.cts +49 -32
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.ts +49 -32
- package/dist/features/row-pagination/rowPaginationFeature.utils.js +49 -32
- package/dist/features/row-pagination/rowPaginationFeature.utils.js.map +1 -1
- package/dist/features/row-pinning/rowPinningFeature.types.d.cts +12 -8
- package/dist/features/row-pinning/rowPinningFeature.types.d.ts +12 -8
- package/dist/features/row-pinning/rowPinningFeature.utils.cjs +39 -29
- package/dist/features/row-pinning/rowPinningFeature.utils.cjs.map +1 -1
- package/dist/features/row-pinning/rowPinningFeature.utils.d.cts +39 -29
- package/dist/features/row-pinning/rowPinningFeature.utils.d.ts +39 -29
- package/dist/features/row-pinning/rowPinningFeature.utils.js +39 -29
- package/dist/features/row-pinning/rowPinningFeature.utils.js.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.types.d.cts +30 -24
- package/dist/features/row-selection/rowSelectionFeature.types.d.ts +30 -24
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs +89 -69
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +89 -69
- package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +89 -69
- package/dist/features/row-selection/rowSelectionFeature.utils.js +89 -69
- package/dist/features/row-selection/rowSelectionFeature.utils.js.map +1 -1
- package/dist/features/row-sorting/rowSortingFeature.types.d.cts +10 -8
- package/dist/features/row-sorting/rowSortingFeature.types.d.ts +10 -8
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs +61 -44
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs.map +1 -1
- package/dist/features/row-sorting/rowSortingFeature.utils.d.cts +61 -44
- package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +61 -44
- package/dist/features/row-sorting/rowSortingFeature.utils.js +61 -44
- package/dist/features/row-sorting/rowSortingFeature.utils.js.map +1 -1
- package/dist/fns/aggregationFns.cjs +33 -9
- package/dist/fns/aggregationFns.cjs.map +1 -1
- package/dist/fns/aggregationFns.d.cts +33 -9
- package/dist/fns/aggregationFns.d.ts +33 -9
- package/dist/fns/aggregationFns.js +33 -9
- package/dist/fns/aggregationFns.js.map +1 -1
- package/dist/fns/filterFns.cjs +48 -17
- package/dist/fns/filterFns.cjs.map +1 -1
- package/dist/fns/filterFns.d.cts +42 -15
- package/dist/fns/filterFns.d.ts +42 -15
- package/dist/fns/filterFns.js +48 -17
- package/dist/fns/filterFns.js.map +1 -1
- package/dist/helpers/columnHelper.cjs +9 -4
- package/dist/helpers/columnHelper.cjs.map +1 -1
- package/dist/helpers/columnHelper.d.cts +9 -4
- package/dist/helpers/columnHelper.d.ts +9 -4
- package/dist/helpers/columnHelper.js +9 -4
- package/dist/helpers/columnHelper.js.map +1 -1
- package/dist/helpers/tableOptions.cjs.map +1 -1
- package/dist/helpers/tableOptions.d.cts +12 -9
- package/dist/helpers/tableOptions.d.ts +12 -9
- package/dist/helpers/tableOptions.js.map +1 -1
- package/dist/types/ColumnDef.d.cts +38 -0
- package/dist/types/ColumnDef.d.ts +38 -0
- package/dist/types/TableOptions.d.cts +15 -0
- package/dist/types/TableOptions.d.ts +15 -0
- package/dist/types/TableState.d.cts +12 -0
- package/dist/types/TableState.d.ts +12 -0
- package/package.json +5 -3
- package/skills/column-definitions/SKILL.md +333 -0
- package/skills/column-layout/SKILL.md +328 -0
- package/skills/column-layout/references/subsystems.md +220 -0
- package/skills/customizing-feature-behavior/SKILL.md +416 -0
- package/skills/filtering/SKILL.md +357 -0
- package/skills/filtering/references/faceting-and-fuzzy.md +191 -0
- package/skills/grouping/SKILL.md +448 -0
- package/skills/migrate-v8-to-v9/SKILL.md +495 -0
- package/skills/pagination/SKILL.md +385 -0
- package/skills/row-expanding/SKILL.md +348 -0
- package/skills/row-pinning/SKILL.md +269 -0
- package/skills/row-selection/SKILL.md +391 -0
- package/skills/setup/SKILL.md +400 -0
- package/skills/sorting/SKILL.md +344 -0
- package/skills/state-management/SKILL.md +388 -0
- package/src/core/cells/coreCellsFeature.utils.ts +11 -8
- package/src/core/columns/coreColumnsFeature.types.ts +7 -6
- package/src/core/columns/coreColumnsFeature.utils.ts +37 -27
- package/src/core/headers/coreHeadersFeature.types.ts +6 -4
- package/src/core/headers/coreHeadersFeature.utils.ts +23 -18
- package/src/core/row-models/coreRowModelsFeature.utils.ts +48 -36
- package/src/core/rows/coreRowsFeature.types.ts +4 -4
- package/src/core/rows/coreRowsFeature.utils.ts +34 -28
- package/src/core/table/coreTablesFeature.types.ts +6 -2
- package/src/core/table/coreTablesFeature.utils.ts +2 -2
- package/src/features/column-faceting/columnFacetingFeature.types.ts +16 -10
- package/src/features/column-faceting/columnFacetingFeature.utils.ts +26 -18
- package/src/features/column-filtering/columnFilteringFeature.types.ts +21 -11
- package/src/features/column-filtering/columnFilteringFeature.utils.ts +39 -28
- package/src/features/column-grouping/columnGroupingFeature.types.ts +18 -14
- package/src/features/column-grouping/columnGroupingFeature.utils.ts +55 -43
- package/src/features/column-ordering/columnOrderingFeature.types.ts +14 -5
- package/src/features/column-ordering/columnOrderingFeature.utils.ts +30 -23
- package/src/features/column-pinning/columnPinningFeature.types.ts +43 -31
- package/src/features/column-pinning/columnPinningFeature.utils.ts +111 -91
- package/src/features/column-resizing/columnResizingFeature.types.ts +9 -9
- package/src/features/column-resizing/columnResizingFeature.utils.ts +28 -19
- package/src/features/column-sizing/columnSizingFeature.types.ts +19 -12
- package/src/features/column-sizing/columnSizingFeature.utils.ts +52 -41
- package/src/features/column-visibility/columnVisibilityFeature.types.ts +16 -13
- package/src/features/column-visibility/columnVisibilityFeature.utils.ts +54 -42
- package/src/features/global-filtering/globalFilteringFeature.types.ts +10 -5
- package/src/features/global-filtering/globalFilteringFeature.utils.ts +20 -14
- package/src/features/row-expanding/rowExpandingFeature.types.ts +16 -15
- package/src/features/row-expanding/rowExpandingFeature.utils.ts +56 -41
- package/src/features/row-pagination/rowPaginationFeature.types.ts +19 -12
- package/src/features/row-pagination/rowPaginationFeature.utils.ts +49 -32
- package/src/features/row-pinning/rowPinningFeature.types.ts +12 -8
- package/src/features/row-pinning/rowPinningFeature.utils.ts +39 -29
- package/src/features/row-selection/rowSelectionFeature.types.ts +30 -24
- package/src/features/row-selection/rowSelectionFeature.utils.ts +89 -69
- package/src/features/row-sorting/rowSortingFeature.types.ts +10 -8
- package/src/features/row-sorting/rowSortingFeature.utils.ts +61 -44
- package/src/fns/aggregationFns.ts +33 -9
- package/src/fns/filterFns.ts +48 -17
- package/src/helpers/columnHelper.ts +9 -4
- package/src/helpers/tableOptions.ts +12 -9
- package/src/types/ColumnDef.ts +38 -0
- package/src/types/TableOptions.ts +15 -0
- package/src/types/TableState.ts +12 -0
|
@@ -7,31 +7,34 @@ import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.js";
|
|
|
7
7
|
|
|
8
8
|
//#region src/features/row-selection/rowSelectionFeature.utils.d.ts
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Creates the default row selection state.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* The feature default is an empty map, meaning no rows are selected. Reset APIs
|
|
13
|
+
* use this value when `defaultState` is `true`.
|
|
13
14
|
*
|
|
14
15
|
* @example
|
|
15
16
|
* ```ts
|
|
16
|
-
* const
|
|
17
|
+
* const selection = getDefaultRowSelectionState()
|
|
17
18
|
* ```
|
|
18
19
|
*/
|
|
19
20
|
declare function getDefaultRowSelectionState(): RowSelectionState;
|
|
20
21
|
/**
|
|
21
|
-
*
|
|
22
|
+
* Routes a row selection updater through the table's selection change handler.
|
|
22
23
|
*
|
|
23
|
-
* The updater
|
|
24
|
+
* The updater may be a next selection map or a function of the previous map,
|
|
25
|
+
* matching the instance `table.setRowSelection` behavior.
|
|
24
26
|
*
|
|
25
27
|
* @example
|
|
26
28
|
* ```ts
|
|
27
|
-
* table_setRowSelection(table, (old) => old)
|
|
29
|
+
* table_setRowSelection(table, (old) => ({ ...old, [rowId]: true }))
|
|
28
30
|
* ```
|
|
29
31
|
*/
|
|
30
32
|
declare function table_setRowSelection<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>, updater: Updater<RowSelectionState>): void;
|
|
31
33
|
/**
|
|
32
|
-
* Resets the
|
|
34
|
+
* Resets `rowSelection` to the configured initial state or feature default.
|
|
33
35
|
*
|
|
34
|
-
*
|
|
36
|
+
* With no argument, the reset clones `table.initialState.rowSelection` when it
|
|
37
|
+
* exists. Passing `true` ignores initial state and resets to `{}`.
|
|
35
38
|
*
|
|
36
39
|
* @example
|
|
37
40
|
* ```ts
|
|
@@ -41,9 +44,10 @@ declare function table_setRowSelection<TFeatures extends TableFeatures, TData ex
|
|
|
41
44
|
*/
|
|
42
45
|
declare function table_resetRowSelection<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean): void;
|
|
43
46
|
/**
|
|
44
|
-
*
|
|
47
|
+
* Selects or deselects every selectable row before grouping.
|
|
45
48
|
*
|
|
46
|
-
*
|
|
49
|
+
* Omitting `value` toggles based on `table_getIsAllRowsSelected(table)`.
|
|
50
|
+
* Deselecting removes matching ids from the existing selection map.
|
|
47
51
|
*
|
|
48
52
|
* @example
|
|
49
53
|
* ```ts
|
|
@@ -52,9 +56,10 @@ declare function table_resetRowSelection<TFeatures extends TableFeatures, TData
|
|
|
52
56
|
*/
|
|
53
57
|
declare function table_toggleAllRowsSelected<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>, value?: boolean): void;
|
|
54
58
|
/**
|
|
55
|
-
*
|
|
59
|
+
* Selects or deselects every selectable row on the current page.
|
|
56
60
|
*
|
|
57
|
-
*
|
|
61
|
+
* Omitting `value` toggles based on `table_getIsAllPageRowsSelected(table)`.
|
|
62
|
+
* Child rows are included when sub-row selection allows it.
|
|
58
63
|
*
|
|
59
64
|
* @example
|
|
60
65
|
* ```ts
|
|
@@ -63,119 +68,129 @@ declare function table_toggleAllRowsSelected<TFeatures extends TableFeatures, TD
|
|
|
63
68
|
*/
|
|
64
69
|
declare function table_toggleAllPageRowsSelected<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>, value?: boolean): void;
|
|
65
70
|
/**
|
|
66
|
-
*
|
|
71
|
+
* Reads the row model before row selection is projected into selected rows.
|
|
67
72
|
*
|
|
68
|
-
*
|
|
73
|
+
* Selection does not alter the base row pipeline, so this returns the core row
|
|
74
|
+
* model.
|
|
69
75
|
*
|
|
70
76
|
* @example
|
|
71
77
|
* ```ts
|
|
72
|
-
* const
|
|
78
|
+
* const rowsBeforeSelection = table_getPreSelectedRowModel(table)
|
|
73
79
|
* ```
|
|
74
80
|
*/
|
|
75
81
|
declare function table_getPreSelectedRowModel<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData>;
|
|
76
82
|
/**
|
|
77
|
-
*
|
|
83
|
+
* Builds a row model containing selected rows from the core row model.
|
|
78
84
|
*
|
|
79
|
-
*
|
|
85
|
+
* If no row ids are selected, an empty row model is returned without walking
|
|
86
|
+
* the rows.
|
|
80
87
|
*
|
|
81
88
|
* @example
|
|
82
89
|
* ```ts
|
|
83
|
-
* const
|
|
90
|
+
* const selectedRows = table_getSelectedRowModel(table)
|
|
84
91
|
* ```
|
|
85
92
|
*/
|
|
86
93
|
declare function table_getSelectedRowModel<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData>;
|
|
87
94
|
/**
|
|
88
|
-
*
|
|
95
|
+
* Builds a row model containing selected rows from the filtered row model.
|
|
89
96
|
*
|
|
90
|
-
*
|
|
97
|
+
* If no row ids are selected, an empty row model is returned without walking
|
|
98
|
+
* the rows.
|
|
91
99
|
*
|
|
92
100
|
* @example
|
|
93
101
|
* ```ts
|
|
94
|
-
* const
|
|
102
|
+
* const selectedRows = table_getFilteredSelectedRowModel(table)
|
|
95
103
|
* ```
|
|
96
104
|
*/
|
|
97
105
|
declare function table_getFilteredSelectedRowModel<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData>;
|
|
98
106
|
/**
|
|
99
|
-
*
|
|
107
|
+
* Builds a row model containing selected rows from the grouped row model.
|
|
100
108
|
*
|
|
101
|
-
*
|
|
109
|
+
* If no row ids are selected, an empty row model is returned without walking
|
|
110
|
+
* the rows.
|
|
102
111
|
*
|
|
103
112
|
* @example
|
|
104
113
|
* ```ts
|
|
105
|
-
* const
|
|
114
|
+
* const selectedRows = table_getGroupedSelectedRowModel(table)
|
|
106
115
|
* ```
|
|
107
116
|
*/
|
|
108
117
|
declare function table_getGroupedSelectedRowModel<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData>;
|
|
109
118
|
/**
|
|
110
|
-
*
|
|
119
|
+
* Checks whether every selectable filtered row is selected.
|
|
111
120
|
*
|
|
112
|
-
*
|
|
121
|
+
* The result is false when there are no filtered rows or when selection state is
|
|
122
|
+
* empty.
|
|
113
123
|
*
|
|
114
124
|
* @example
|
|
115
125
|
* ```ts
|
|
116
|
-
* const
|
|
126
|
+
* const allSelected = table_getIsAllRowsSelected(table)
|
|
117
127
|
* ```
|
|
118
128
|
*/
|
|
119
129
|
declare function table_getIsAllRowsSelected<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): boolean;
|
|
120
130
|
/**
|
|
121
|
-
*
|
|
131
|
+
* Checks whether every selectable row on the current page is selected.
|
|
122
132
|
*
|
|
123
|
-
*
|
|
133
|
+
* Non-selectable rows are ignored for this calculation.
|
|
124
134
|
*
|
|
125
135
|
* @example
|
|
126
136
|
* ```ts
|
|
127
|
-
* const
|
|
137
|
+
* const allPageRowsSelected = table_getIsAllPageRowsSelected(table)
|
|
128
138
|
* ```
|
|
129
139
|
*/
|
|
130
140
|
declare function table_getIsAllPageRowsSelected<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): boolean;
|
|
131
141
|
/**
|
|
132
|
-
*
|
|
142
|
+
* Checks whether selection is partially applied across filtered rows.
|
|
133
143
|
*
|
|
134
|
-
*
|
|
144
|
+
* The result is true when at least one row id is selected but fewer ids are
|
|
145
|
+
* selected than the current filtered flat row count.
|
|
135
146
|
*
|
|
136
147
|
* @example
|
|
137
148
|
* ```ts
|
|
138
|
-
* const
|
|
149
|
+
* const someRowsSelected = table_getIsSomeRowsSelected(table)
|
|
139
150
|
* ```
|
|
140
151
|
*/
|
|
141
152
|
declare function table_getIsSomeRowsSelected<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): boolean;
|
|
142
153
|
/**
|
|
143
|
-
*
|
|
154
|
+
* Checks whether the current page has a partial selection.
|
|
144
155
|
*
|
|
145
|
-
* This
|
|
156
|
+
* This is false when all selectable page rows are selected. Otherwise it is true
|
|
157
|
+
* if any selectable page row or descendant is selected.
|
|
146
158
|
*
|
|
147
159
|
* @example
|
|
148
160
|
* ```ts
|
|
149
|
-
* const
|
|
161
|
+
* const somePageRowsSelected = table_getIsSomePageRowsSelected(table)
|
|
150
162
|
* ```
|
|
151
163
|
*/
|
|
152
164
|
declare function table_getIsSomePageRowsSelected<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): boolean;
|
|
153
165
|
/**
|
|
154
|
-
*
|
|
166
|
+
* Creates a checkbox-style handler that selects or deselects all rows.
|
|
155
167
|
*
|
|
156
|
-
* The handler
|
|
168
|
+
* The handler reads `event.target.checked`, so it is intended for controls whose
|
|
169
|
+
* checked state means "all rows selected".
|
|
157
170
|
*
|
|
158
171
|
* @example
|
|
159
172
|
* ```ts
|
|
160
|
-
* const
|
|
173
|
+
* const onChange = table_getToggleAllRowsSelectedHandler(table)
|
|
161
174
|
* ```
|
|
162
175
|
*/
|
|
163
176
|
declare function table_getToggleAllRowsSelectedHandler<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): (e: unknown) => void;
|
|
164
177
|
/**
|
|
165
|
-
*
|
|
178
|
+
* Creates a checkbox-style handler that selects or deselects current page rows.
|
|
166
179
|
*
|
|
167
|
-
* The handler
|
|
180
|
+
* The handler reads `event.target.checked`, so it is intended for controls whose
|
|
181
|
+
* checked state means "all page rows selected".
|
|
168
182
|
*
|
|
169
183
|
* @example
|
|
170
184
|
* ```ts
|
|
171
|
-
* const
|
|
185
|
+
* const onChange = table_getToggleAllPageRowsSelectedHandler(table)
|
|
172
186
|
* ```
|
|
173
187
|
*/
|
|
174
188
|
declare function table_getToggleAllPageRowsSelectedHandler<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): (e: unknown) => void;
|
|
175
189
|
/**
|
|
176
|
-
*
|
|
190
|
+
* Selects or deselects this row.
|
|
177
191
|
*
|
|
178
|
-
*
|
|
192
|
+
* Omitting `value` toggles the row. Child rows are selected recursively unless
|
|
193
|
+
* `opts.selectChildren` is `false` or sub-row selection is disabled.
|
|
179
194
|
*
|
|
180
195
|
* @example
|
|
181
196
|
* ```ts
|
|
@@ -186,90 +201,95 @@ declare function row_toggleSelected<TFeatures extends TableFeatures, TData exten
|
|
|
186
201
|
selectChildren?: boolean;
|
|
187
202
|
}): void;
|
|
188
203
|
/**
|
|
189
|
-
*
|
|
204
|
+
* Checks whether this row id is selected in `state.rowSelection`.
|
|
190
205
|
*
|
|
191
|
-
*
|
|
206
|
+
* Missing row ids are treated as not selected.
|
|
192
207
|
*
|
|
193
208
|
* @example
|
|
194
209
|
* ```ts
|
|
195
|
-
* const
|
|
210
|
+
* const selected = row_getIsSelected(row)
|
|
196
211
|
* ```
|
|
197
212
|
*/
|
|
198
213
|
declare function row_getIsSelected<TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData>): boolean;
|
|
199
214
|
/**
|
|
200
|
-
*
|
|
215
|
+
* Checks whether some, but not all, selectable descendants are selected.
|
|
201
216
|
*
|
|
202
|
-
* This
|
|
217
|
+
* This supports indeterminate selection UI for parent rows.
|
|
203
218
|
*
|
|
204
219
|
* @example
|
|
205
220
|
* ```ts
|
|
206
|
-
* const
|
|
221
|
+
* const partial = row_getIsSomeSelected(row)
|
|
207
222
|
* ```
|
|
208
223
|
*/
|
|
209
224
|
declare function row_getIsSomeSelected<TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData>): boolean;
|
|
210
225
|
/**
|
|
211
|
-
*
|
|
226
|
+
* Checks whether all selectable descendants are selected.
|
|
212
227
|
*
|
|
213
|
-
*
|
|
228
|
+
* Rows without selectable descendants return false.
|
|
214
229
|
*
|
|
215
230
|
* @example
|
|
216
231
|
* ```ts
|
|
217
|
-
* const
|
|
232
|
+
* const allChildrenSelected = row_getIsAllSubRowsSelected(row)
|
|
218
233
|
* ```
|
|
219
234
|
*/
|
|
220
235
|
declare function row_getIsAllSubRowsSelected<TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData>): boolean;
|
|
221
236
|
/**
|
|
222
|
-
*
|
|
237
|
+
* Checks whether this row can be selected.
|
|
223
238
|
*
|
|
224
|
-
*
|
|
239
|
+
* `options.enableRowSelection` may be a boolean or a row predicate; it defaults
|
|
240
|
+
* to `true`.
|
|
225
241
|
*
|
|
226
242
|
* @example
|
|
227
243
|
* ```ts
|
|
228
|
-
* const
|
|
244
|
+
* const canSelect = row_getCanSelect(row)
|
|
229
245
|
* ```
|
|
230
246
|
*/
|
|
231
247
|
declare function row_getCanSelect<TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData>): boolean;
|
|
232
248
|
/**
|
|
233
|
-
*
|
|
249
|
+
* Checks whether selecting this row should also select its subRows.
|
|
234
250
|
*
|
|
235
|
-
*
|
|
251
|
+
* `options.enableSubRowSelection` may be a boolean or a row predicate; it
|
|
252
|
+
* defaults to `true`.
|
|
236
253
|
*
|
|
237
254
|
* @example
|
|
238
255
|
* ```ts
|
|
239
|
-
* const
|
|
256
|
+
* const canSelectChildren = row_getCanSelectSubRows(row)
|
|
240
257
|
* ```
|
|
241
258
|
*/
|
|
242
259
|
declare function row_getCanSelectSubRows<TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData>): boolean;
|
|
243
260
|
/**
|
|
244
|
-
*
|
|
261
|
+
* Checks whether this row can be selected alongside other rows.
|
|
245
262
|
*
|
|
246
|
-
*
|
|
263
|
+
* `options.enableMultiRowSelection` may be a boolean or a row predicate; it
|
|
264
|
+
* defaults to `true`.
|
|
247
265
|
*
|
|
248
266
|
* @example
|
|
249
267
|
* ```ts
|
|
250
|
-
* const
|
|
268
|
+
* const canMultiSelect = row_getCanMultiSelect(row)
|
|
251
269
|
* ```
|
|
252
270
|
*/
|
|
253
271
|
declare function row_getCanMultiSelect<TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData>): boolean;
|
|
254
272
|
/**
|
|
255
|
-
*
|
|
273
|
+
* Creates a checkbox-style handler that selects or deselects this row.
|
|
256
274
|
*
|
|
257
|
-
* The handler is
|
|
275
|
+
* The handler is a no-op when the row cannot be selected and reads
|
|
276
|
+
* `event.target.checked`.
|
|
258
277
|
*
|
|
259
278
|
* @example
|
|
260
279
|
* ```ts
|
|
261
|
-
* const
|
|
280
|
+
* const onChange = row_getToggleSelectedHandler(row)
|
|
262
281
|
* ```
|
|
263
282
|
*/
|
|
264
283
|
declare function row_getToggleSelectedHandler<TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData>): (e: unknown) => void;
|
|
265
284
|
/**
|
|
266
285
|
* Builds a row model containing rows selected by the current row selection state.
|
|
267
286
|
*
|
|
268
|
-
* The result is derived from the supplied row model, so selected ids absent from
|
|
287
|
+
* The result is derived from the supplied row model, so selected ids absent from
|
|
288
|
+
* that model are not materialized as rows.
|
|
269
289
|
*
|
|
270
290
|
* @example
|
|
271
291
|
* ```ts
|
|
272
|
-
* const selectedRows = selectRowsFn(
|
|
292
|
+
* const selectedRows = selectRowsFn(rowModel)
|
|
273
293
|
* ```
|
|
274
294
|
*/
|
|
275
295
|
declare function selectRowsFn<TFeatures extends TableFeatures, TData extends RowData>(rowModel: RowModel<TFeatures, TData>): RowModel<TFeatures, TData>;
|
|
@@ -278,7 +298,7 @@ declare function selectRowsFn<TFeatures extends TableFeatures, TData extends Row
|
|
|
278
298
|
*
|
|
279
299
|
* @example
|
|
280
300
|
* ```ts
|
|
281
|
-
* const selected = isRowSelected(row
|
|
301
|
+
* const selected = isRowSelected(row)
|
|
282
302
|
* ```
|
|
283
303
|
*/
|
|
284
304
|
declare function isRowSelected<TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData>): boolean;
|
|
@@ -289,7 +309,7 @@ declare function isRowSelected<TFeatures extends TableFeatures, TData extends Ro
|
|
|
289
309
|
*
|
|
290
310
|
* @example
|
|
291
311
|
* ```ts
|
|
292
|
-
* const selectedState = isSubRowSelected(row
|
|
312
|
+
* const selectedState = isSubRowSelected(row)
|
|
293
313
|
* ```
|
|
294
314
|
*/
|
|
295
315
|
declare function isSubRowSelected<TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData>): boolean | 'some' | 'all';
|