@tanstack/table-core 9.0.0-alpha.46 → 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/constructCell.cjs +4 -3
- package/dist/core/cells/constructCell.cjs.map +1 -1
- package/dist/core/cells/constructCell.js +4 -3
- package/dist/core/cells/constructCell.js.map +1 -1
- 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/constructColumn.cjs +6 -4
- package/dist/core/columns/constructColumn.cjs.map +1 -1
- package/dist/core/columns/constructColumn.js +6 -4
- package/dist/core/columns/constructColumn.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 +47 -29
- 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 +47 -29
- package/dist/core/columns/coreColumnsFeature.utils.js.map +1 -1
- package/dist/core/headers/buildHeaderGroups.cjs +27 -19
- package/dist/core/headers/buildHeaderGroups.cjs.map +1 -1
- package/dist/core/headers/buildHeaderGroups.js +27 -19
- package/dist/core/headers/buildHeaderGroups.js.map +1 -1
- package/dist/core/headers/constructHeader.cjs +4 -3
- package/dist/core/headers/constructHeader.cjs.map +1 -1
- package/dist/core/headers/constructHeader.js +4 -3
- package/dist/core/headers/constructHeader.js.map +1 -1
- package/dist/core/headers/coreHeadersFeature.cjs +1 -6
- package/dist/core/headers/coreHeadersFeature.cjs.map +1 -1
- package/dist/core/headers/coreHeadersFeature.js +2 -7
- package/dist/core/headers/coreHeadersFeature.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 +43 -36
- package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
- package/dist/core/headers/coreHeadersFeature.utils.d.cts +24 -19
- package/dist/core/headers/coreHeadersFeature.utils.d.ts +24 -19
- package/dist/core/headers/coreHeadersFeature.utils.js +44 -37
- package/dist/core/headers/coreHeadersFeature.utils.js.map +1 -1
- package/dist/core/reactivity/coreReactivityFeature.types.d.cts +4 -0
- package/dist/core/reactivity/coreReactivityFeature.types.d.ts +4 -0
- 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/constructRow.cjs +8 -6
- package/dist/core/rows/constructRow.cjs.map +1 -1
- package/dist/core/rows/constructRow.js +8 -6
- package/dist/core/rows/constructRow.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 +43 -32
- 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 +43 -32
- package/dist/core/rows/coreRowsFeature.utils.js.map +1 -1
- package/dist/core/table/constructTable.cjs +9 -5
- package/dist/core/table/constructTable.cjs.map +1 -1
- package/dist/core/table/constructTable.js +9 -5
- package/dist/core/table/constructTable.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 +7 -3
- 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 +7 -3
- 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-faceting/createFacetedMinMaxValues.cjs +8 -5
- package/dist/features/column-faceting/createFacetedMinMaxValues.cjs.map +1 -1
- package/dist/features/column-faceting/createFacetedMinMaxValues.js +8 -5
- package/dist/features/column-faceting/createFacetedMinMaxValues.js.map +1 -1
- package/dist/features/column-faceting/createFacetedRowModel.cjs +8 -3
- package/dist/features/column-faceting/createFacetedRowModel.cjs.map +1 -1
- package/dist/features/column-faceting/createFacetedRowModel.js +8 -3
- package/dist/features/column-faceting/createFacetedRowModel.js.map +1 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs +7 -4
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs.map +1 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.js +7 -4
- package/dist/features/column-faceting/createFacetedUniqueValues.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-filtering/createFilteredRowModel.cjs +11 -5
- package/dist/features/column-filtering/createFilteredRowModel.cjs.map +1 -1
- package/dist/features/column-filtering/createFilteredRowModel.js +11 -5
- package/dist/features/column-filtering/createFilteredRowModel.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 +46 -29
- 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 +46 -29
- 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 +152 -115
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +116 -95
- package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +116 -95
- package/dist/features/column-pinning/columnPinningFeature.utils.js +153 -116
- 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.cjs +28 -4
- package/dist/features/column-sizing/columnSizingFeature.cjs.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.js +28 -4
- package/dist/features/column-sizing/columnSizingFeature.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.cjs +23 -14
- package/dist/features/column-visibility/columnVisibilityFeature.cjs.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.js +24 -15
- package/dist/features/column-visibility/columnVisibilityFeature.js.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.cts +19 -12
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +19 -12
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs +91 -52
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +63 -40
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +63 -40
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js +91 -53
- 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 +58 -43
- 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 +58 -43
- 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 +52 -36
- 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 +52 -36
- 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 +95 -72
- 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 +95 -72
- package/dist/features/row-selection/rowSelectionFeature.utils.js.map +1 -1
- package/dist/features/row-sorting/createSortedRowModel.cjs +13 -8
- package/dist/features/row-sorting/createSortedRowModel.cjs.map +1 -1
- package/dist/features/row-sorting/createSortedRowModel.js +13 -8
- package/dist/features/row-sorting/createSortedRowModel.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 +63 -46
- 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 +63 -46
- package/dist/features/row-sorting/rowSortingFeature.utils.js.map +1 -1
- package/dist/fns/aggregationFns.cjs +47 -16
- 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 +47 -17
- 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/index.cjs +0 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/static-functions.cjs +1 -0
- package/dist/static-functions.d.cts +2 -2
- package/dist/static-functions.d.ts +2 -2
- package/dist/static-functions.js +2 -2
- package/dist/store-reactivity-bindings.cjs +1 -0
- package/dist/store-reactivity-bindings.cjs.map +1 -1
- package/dist/store-reactivity-bindings.js +1 -0
- package/dist/store-reactivity-bindings.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/dist/utils.cjs +18 -39
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -23
- package/dist/utils.d.ts +1 -23
- package/dist/utils.js +19 -36
- package/dist/utils.js.map +1 -1
- 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/constructCell.ts +3 -2
- package/src/core/cells/coreCellsFeature.utils.ts +11 -8
- package/src/core/columns/constructColumn.ts +5 -3
- package/src/core/columns/coreColumnsFeature.types.ts +7 -6
- package/src/core/columns/coreColumnsFeature.utils.ts +43 -29
- package/src/core/headers/buildHeaderGroups.ts +29 -30
- package/src/core/headers/constructHeader.ts +3 -2
- package/src/core/headers/coreHeadersFeature.ts +2 -27
- package/src/core/headers/coreHeadersFeature.types.ts +6 -4
- package/src/core/headers/coreHeadersFeature.utils.ts +52 -61
- package/src/core/reactivity/coreReactivityFeature.types.ts +4 -0
- package/src/core/row-models/coreRowModelsFeature.utils.ts +48 -36
- package/src/core/rows/constructRow.ts +6 -4
- package/src/core/rows/coreRowsFeature.types.ts +4 -4
- package/src/core/rows/coreRowsFeature.utils.ts +45 -32
- package/src/core/table/constructTable.ts +6 -4
- package/src/core/table/coreTablesFeature.types.ts +6 -2
- package/src/core/table/coreTablesFeature.utils.ts +5 -3
- package/src/features/column-faceting/columnFacetingFeature.types.ts +16 -10
- package/src/features/column-faceting/columnFacetingFeature.utils.ts +26 -18
- package/src/features/column-faceting/createFacetedMinMaxValues.ts +8 -10
- package/src/features/column-faceting/createFacetedRowModel.ts +10 -6
- package/src/features/column-faceting/createFacetedUniqueValues.ts +4 -3
- package/src/features/column-filtering/columnFilteringFeature.types.ts +21 -11
- package/src/features/column-filtering/columnFilteringFeature.utils.ts +39 -28
- package/src/features/column-filtering/createFilteredRowModel.ts +14 -8
- 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 +44 -29
- package/src/features/column-pinning/columnPinningFeature.types.ts +43 -31
- package/src/features/column-pinning/columnPinningFeature.utils.ts +164 -128
- 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.ts +16 -0
- 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.ts +8 -0
- package/src/features/column-visibility/columnVisibilityFeature.types.ts +22 -12
- package/src/features/column-visibility/columnVisibilityFeature.utils.ts +101 -56
- 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 +58 -43
- 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 +59 -47
- package/src/features/row-selection/rowSelectionFeature.types.ts +30 -24
- package/src/features/row-selection/rowSelectionFeature.utils.ts +109 -88
- package/src/features/row-sorting/createSortedRowModel.ts +16 -13
- package/src/features/row-sorting/rowSortingFeature.types.ts +10 -8
- package/src/features/row-sorting/rowSortingFeature.utils.ts +63 -46
- package/src/fns/aggregationFns.ts +53 -17
- package/src/fns/filterFns.ts +48 -17
- package/src/helpers/columnHelper.ts +9 -4
- package/src/helpers/tableOptions.ts +12 -9
- package/src/store-reactivity-bindings.ts +1 -0
- package/src/types/ColumnDef.ts +38 -0
- package/src/types/TableOptions.ts +15 -0
- package/src/types/TableState.ts +12 -0
- package/src/utils.ts +19 -46
|
@@ -9,13 +9,14 @@ import type { ColumnVisibilityState } from './columnVisibilityFeature.types'
|
|
|
9
9
|
import type { Row } from '../../types/Row'
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Creates the default column visibility state.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
14
|
+
* The feature default is an empty object, where missing column ids are treated
|
|
15
|
+
* as visible. Reset APIs use this value when `defaultState` is `true`.
|
|
15
16
|
*
|
|
16
17
|
* @example
|
|
17
18
|
* ```ts
|
|
18
|
-
* const
|
|
19
|
+
* const visibility = getDefaultColumnVisibilityState()
|
|
19
20
|
* ```
|
|
20
21
|
*/
|
|
21
22
|
export function getDefaultColumnVisibilityState(): ColumnVisibilityState {
|
|
@@ -23,9 +24,10 @@ export function getDefaultColumnVisibilityState(): ColumnVisibilityState {
|
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
|
-
*
|
|
27
|
+
* Updates this column's visibility when hiding is allowed.
|
|
27
28
|
*
|
|
28
|
-
*
|
|
29
|
+
* Passing `visible` stores that value. Omitting it flips the column's current
|
|
30
|
+
* visibility state. Columns that cannot hide are left unchanged.
|
|
29
31
|
*
|
|
30
32
|
* @example
|
|
31
33
|
* ```ts
|
|
@@ -48,13 +50,15 @@ export function column_toggleVisibility<
|
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
/**
|
|
51
|
-
*
|
|
53
|
+
* Checks whether this column is visible.
|
|
52
54
|
*
|
|
53
|
-
*
|
|
55
|
+
* Leaf columns read `state.columnVisibility[column.id]`, where missing entries
|
|
56
|
+
* default to visible. Parent columns are visible when at least one child column
|
|
57
|
+
* is visible.
|
|
54
58
|
*
|
|
55
59
|
* @example
|
|
56
60
|
* ```ts
|
|
57
|
-
* const
|
|
61
|
+
* const visible = column_getIsVisible(column)
|
|
58
62
|
* ```
|
|
59
63
|
*/
|
|
60
64
|
export function column_getIsVisible<
|
|
@@ -73,13 +77,13 @@ export function column_getIsVisible<
|
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
/**
|
|
76
|
-
*
|
|
80
|
+
* Checks whether this column is allowed to be hidden.
|
|
77
81
|
*
|
|
78
|
-
*
|
|
82
|
+
* Both `columnDef.enableHiding` and table `enableHiding` default to `true`.
|
|
79
83
|
*
|
|
80
84
|
* @example
|
|
81
85
|
* ```ts
|
|
82
|
-
* const
|
|
86
|
+
* const canHide = column_getCanHide(column)
|
|
83
87
|
* ```
|
|
84
88
|
*/
|
|
85
89
|
export function column_getCanHide<
|
|
@@ -94,13 +98,14 @@ export function column_getCanHide<
|
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
/**
|
|
97
|
-
*
|
|
101
|
+
* Creates a checkbox-style handler that writes this column's visibility.
|
|
98
102
|
*
|
|
99
|
-
* The handler
|
|
103
|
+
* The handler reads `event.target.checked`, so it is intended for visibility
|
|
104
|
+
* controls whose checked state means "visible".
|
|
100
105
|
*
|
|
101
106
|
* @example
|
|
102
107
|
* ```ts
|
|
103
|
-
* const
|
|
108
|
+
* const onChange = column_getToggleVisibilityHandler(column)
|
|
104
109
|
* ```
|
|
105
110
|
*/
|
|
106
111
|
export function column_getToggleVisibilityHandler<
|
|
@@ -117,63 +122,96 @@ export function column_getToggleVisibilityHandler<
|
|
|
117
122
|
}
|
|
118
123
|
|
|
119
124
|
/**
|
|
120
|
-
*
|
|
125
|
+
* Collects the cells from this row whose columns are visible.
|
|
121
126
|
*
|
|
122
|
-
*
|
|
127
|
+
* When column pinning is active, the result is ordered as left-pinned cells,
|
|
128
|
+
* center cells, then right-pinned cells.
|
|
123
129
|
*
|
|
124
130
|
* @example
|
|
125
131
|
* ```ts
|
|
126
|
-
* const
|
|
132
|
+
* const visibleCells = row_getVisibleCells(row)
|
|
127
133
|
* ```
|
|
128
134
|
*/
|
|
129
135
|
export function row_getVisibleCells<
|
|
130
136
|
TFeatures extends TableFeatures,
|
|
131
137
|
TData extends RowData,
|
|
132
138
|
>(row: Row<TFeatures, TData>): Array<Cell<TFeatures, TData, unknown>> {
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
)
|
|
139
|
+
const allCells = row.getAllCells()
|
|
140
|
+
const visibleCells: Array<Cell<TFeatures, TData, unknown>> = []
|
|
141
|
+
for (let i = 0; i < allCells.length; i++) {
|
|
142
|
+
const cell = allCells[i]!
|
|
143
|
+
if (callMemoOrStaticFn(cell.column, 'getIsVisible', column_getIsVisible)) {
|
|
144
|
+
visibleCells.push(cell)
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
138
148
|
const { left, right } =
|
|
139
149
|
row.table.atoms.columnPinning?.get() ?? getDefaultColumnPinningState()
|
|
140
|
-
if (!left.length && !right.length) return
|
|
150
|
+
if (!left.length && !right.length) return visibleCells // no pinning, return early
|
|
141
151
|
|
|
142
|
-
const
|
|
143
|
-
|
|
152
|
+
const visibleCellsByColumnId = callMemoOrStaticFn(
|
|
153
|
+
row,
|
|
154
|
+
'getVisibleCellsByColumnId',
|
|
155
|
+
row_getVisibleCellsByColumnId,
|
|
156
|
+
)
|
|
144
157
|
|
|
145
158
|
const leftCells: Array<Cell<TFeatures, TData, unknown>> = []
|
|
146
|
-
for (
|
|
147
|
-
const cell =
|
|
159
|
+
for (let i = 0; i < left.length; i++) {
|
|
160
|
+
const cell = visibleCellsByColumnId[left[i]!]
|
|
148
161
|
if (cell) leftCells.push(cell)
|
|
149
162
|
}
|
|
150
163
|
|
|
151
164
|
const rightCells: Array<Cell<TFeatures, TData, unknown>> = []
|
|
152
|
-
for (
|
|
153
|
-
const cell =
|
|
165
|
+
for (let i = 0; i < right.length; i++) {
|
|
166
|
+
const cell = visibleCellsByColumnId[right[i]!]
|
|
154
167
|
if (cell) rightCells.push(cell)
|
|
155
168
|
}
|
|
156
169
|
|
|
157
170
|
// Center cells: visible cells in natural column order, minus pinned ones.
|
|
158
|
-
const leftSet = new Set(left)
|
|
159
|
-
const rightSet = new Set(right)
|
|
160
171
|
const centerCells: Array<Cell<TFeatures, TData, unknown>> = []
|
|
161
|
-
for (
|
|
172
|
+
for (let i = 0; i < visibleCells.length; i++) {
|
|
173
|
+
const cell = visibleCells[i]!
|
|
162
174
|
const id = cell.column.id
|
|
163
|
-
if (!
|
|
175
|
+
if (!left.includes(id) && !right.includes(id)) centerCells.push(cell)
|
|
164
176
|
}
|
|
165
177
|
|
|
166
178
|
return [...leftCells, ...centerCells, ...rightCells]
|
|
167
179
|
}
|
|
168
180
|
|
|
169
181
|
/**
|
|
170
|
-
*
|
|
182
|
+
* Builds a lookup map of this row's visible cells keyed by column id.
|
|
183
|
+
*
|
|
184
|
+
* Hidden columns are omitted from the map.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```ts
|
|
188
|
+
* const visibleCellsById = row_getVisibleCellsByColumnId(row)
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
export function row_getVisibleCellsByColumnId<
|
|
192
|
+
TFeatures extends TableFeatures,
|
|
193
|
+
TData extends RowData,
|
|
194
|
+
>(row: Row<TFeatures, TData>): Record<string, Cell<TFeatures, TData, unknown>> {
|
|
195
|
+
const result: Record<string, Cell<TFeatures, TData, unknown>> = {}
|
|
196
|
+
const allCells = row.getAllCells()
|
|
197
|
+
for (let i = 0; i < allCells.length; i++) {
|
|
198
|
+
const cell = allCells[i]!
|
|
199
|
+
if (callMemoOrStaticFn(cell.column, 'getIsVisible', column_getIsVisible)) {
|
|
200
|
+
result[cell.column.id] = cell
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return result
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Filters the flat column list down to visible columns.
|
|
171
208
|
*
|
|
172
|
-
*
|
|
209
|
+
* Parent/group columns are included when `column_getIsVisible` considers them
|
|
210
|
+
* visible.
|
|
173
211
|
*
|
|
174
212
|
* @example
|
|
175
213
|
* ```ts
|
|
176
|
-
* const
|
|
214
|
+
* const columns = table_getVisibleFlatColumns(table)
|
|
177
215
|
* ```
|
|
178
216
|
*/
|
|
179
217
|
export function table_getVisibleFlatColumns<
|
|
@@ -188,13 +226,14 @@ export function table_getVisibleFlatColumns<
|
|
|
188
226
|
}
|
|
189
227
|
|
|
190
228
|
/**
|
|
191
|
-
*
|
|
229
|
+
* Filters leaf columns down to those currently visible.
|
|
192
230
|
*
|
|
193
|
-
* This
|
|
231
|
+
* This is the column list most row rendering code uses before pinning-specific
|
|
232
|
+
* partitioning.
|
|
194
233
|
*
|
|
195
234
|
* @example
|
|
196
235
|
* ```ts
|
|
197
|
-
* const
|
|
236
|
+
* const columns = table_getVisibleLeafColumns(table)
|
|
198
237
|
* ```
|
|
199
238
|
*/
|
|
200
239
|
export function table_getVisibleLeafColumns<
|
|
@@ -209,13 +248,14 @@ export function table_getVisibleLeafColumns<
|
|
|
209
248
|
}
|
|
210
249
|
|
|
211
250
|
/**
|
|
212
|
-
*
|
|
251
|
+
* Routes a column visibility updater through the table's visibility change handler.
|
|
213
252
|
*
|
|
214
|
-
* The updater
|
|
253
|
+
* The updater may be a next visibility map or a function of the previous map,
|
|
254
|
+
* matching the instance `table.setColumnVisibility` behavior.
|
|
215
255
|
*
|
|
216
256
|
* @example
|
|
217
257
|
* ```ts
|
|
218
|
-
* table_setColumnVisibility(table, (old) => old)
|
|
258
|
+
* table_setColumnVisibility(table, (old) => ({ ...old, age: false }))
|
|
219
259
|
* ```
|
|
220
260
|
*/
|
|
221
261
|
export function table_setColumnVisibility<
|
|
@@ -229,9 +269,10 @@ export function table_setColumnVisibility<
|
|
|
229
269
|
}
|
|
230
270
|
|
|
231
271
|
/**
|
|
232
|
-
* Resets the
|
|
272
|
+
* Resets `columnVisibility` to the configured initial state or feature default.
|
|
233
273
|
*
|
|
234
|
-
*
|
|
274
|
+
* With no argument, the reset clones `table.initialState.columnVisibility` when
|
|
275
|
+
* it exists. Passing `true` ignores initial state and resets to `{}`.
|
|
235
276
|
*
|
|
236
277
|
* @example
|
|
237
278
|
* ```ts
|
|
@@ -250,9 +291,9 @@ export function table_resetColumnVisibility<
|
|
|
250
291
|
}
|
|
251
292
|
|
|
252
293
|
/**
|
|
253
|
-
*
|
|
294
|
+
* Shows or hides every hideable leaf column.
|
|
254
295
|
*
|
|
255
|
-
*
|
|
296
|
+
* Columns that cannot hide stay visible when toggling all columns off.
|
|
256
297
|
*
|
|
257
298
|
* @example
|
|
258
299
|
* ```ts
|
|
@@ -266,7 +307,9 @@ export function table_toggleAllColumnsVisible<
|
|
|
266
307
|
value = value ?? !table_getIsAllColumnsVisible(table)
|
|
267
308
|
|
|
268
309
|
const visibility: Record<string, boolean> = {}
|
|
269
|
-
|
|
310
|
+
const leafColumns = table.getAllLeafColumns()
|
|
311
|
+
for (let i = 0; i < leafColumns.length; i++) {
|
|
312
|
+
const column = leafColumns[i]!
|
|
270
313
|
visibility[column.id] = !value ? !column_getCanHide(column) : value
|
|
271
314
|
}
|
|
272
315
|
|
|
@@ -274,13 +317,14 @@ export function table_toggleAllColumnsVisible<
|
|
|
274
317
|
}
|
|
275
318
|
|
|
276
319
|
/**
|
|
277
|
-
*
|
|
320
|
+
* Checks whether every leaf column is currently visible.
|
|
278
321
|
*
|
|
279
|
-
*
|
|
322
|
+
* Non-hideable columns are naturally visible because missing visibility entries
|
|
323
|
+
* default to `true`.
|
|
280
324
|
*
|
|
281
325
|
* @example
|
|
282
326
|
* ```ts
|
|
283
|
-
* const
|
|
327
|
+
* const allVisible = table_getIsAllColumnsVisible(table)
|
|
284
328
|
* ```
|
|
285
329
|
*/
|
|
286
330
|
export function table_getIsAllColumnsVisible<
|
|
@@ -296,13 +340,13 @@ export function table_getIsAllColumnsVisible<
|
|
|
296
340
|
}
|
|
297
341
|
|
|
298
342
|
/**
|
|
299
|
-
*
|
|
343
|
+
* Checks whether at least one leaf column is currently visible.
|
|
300
344
|
*
|
|
301
|
-
* This
|
|
345
|
+
* This is useful for tri-state "show all columns" controls.
|
|
302
346
|
*
|
|
303
347
|
* @example
|
|
304
348
|
* ```ts
|
|
305
|
-
* const
|
|
349
|
+
* const someVisible = table_getIsSomeColumnsVisible(table)
|
|
306
350
|
* ```
|
|
307
351
|
*/
|
|
308
352
|
export function table_getIsSomeColumnsVisible<
|
|
@@ -317,13 +361,14 @@ export function table_getIsSomeColumnsVisible<
|
|
|
317
361
|
}
|
|
318
362
|
|
|
319
363
|
/**
|
|
320
|
-
*
|
|
364
|
+
* Creates a checkbox-style handler that shows or hides all columns.
|
|
321
365
|
*
|
|
322
|
-
* The handler
|
|
366
|
+
* The handler reads `event.target.checked`, so it is intended for controls whose
|
|
367
|
+
* checked state means "all columns visible".
|
|
323
368
|
*
|
|
324
369
|
* @example
|
|
325
370
|
* ```ts
|
|
326
|
-
* const
|
|
371
|
+
* const onChange = table_getToggleAllColumnsVisibilityHandler(table)
|
|
327
372
|
* ```
|
|
328
373
|
*/
|
|
329
374
|
export function table_getToggleAllColumnsVisibilityHandler<
|
|
@@ -17,14 +17,17 @@ export interface TableState_GlobalFiltering {
|
|
|
17
17
|
|
|
18
18
|
export interface ColumnDef_GlobalFiltering {
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Allows this column to be scanned by global filtering.
|
|
21
|
+
*
|
|
22
|
+
* Defaults to `true`; table-level global filtering and `enableFilters` must
|
|
23
|
+
* also allow filtering.
|
|
21
24
|
*/
|
|
22
25
|
enableGlobalFilter?: boolean
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
export interface Column_GlobalFiltering {
|
|
26
29
|
/**
|
|
27
|
-
*
|
|
30
|
+
* Checks whether this accessor column participates in global filtering.
|
|
28
31
|
*/
|
|
29
32
|
getCanGlobalFilter: () => boolean
|
|
30
33
|
}
|
|
@@ -34,7 +37,7 @@ export interface TableOptions_GlobalFiltering<
|
|
|
34
37
|
TData extends RowData,
|
|
35
38
|
> {
|
|
36
39
|
/**
|
|
37
|
-
* Enables
|
|
40
|
+
* Enables global filtering across columns that allow it.
|
|
38
41
|
*/
|
|
39
42
|
enableGlobalFilter?: boolean
|
|
40
43
|
/**
|
|
@@ -76,11 +79,13 @@ export interface Table_GlobalFiltering<
|
|
|
76
79
|
*/
|
|
77
80
|
getGlobalFilterFn: () => FilterFn<TFeatures, TData> | undefined
|
|
78
81
|
/**
|
|
79
|
-
* Resets
|
|
82
|
+
* Resets `globalFilter` to `initialState.globalFilter`.
|
|
83
|
+
*
|
|
84
|
+
* Pass `true` to ignore initial state and reset to `undefined`.
|
|
80
85
|
*/
|
|
81
86
|
resetGlobalFilter: (defaultState?: boolean) => void
|
|
82
87
|
/**
|
|
83
|
-
*
|
|
88
|
+
* Updates global filter state with a next value or updater function.
|
|
84
89
|
*/
|
|
85
90
|
setGlobalFilter: (updater: Updater<any>) => void
|
|
86
91
|
}
|
|
@@ -7,13 +7,14 @@ import type { TableFeatures } from '../../types/TableFeatures'
|
|
|
7
7
|
import type { Table_Internal } from '../../types/Table'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Checks whether this accessor column participates in global filtering.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* The column must have an accessor and pass column-level, table-level, and
|
|
13
|
+
* optional `getColumnCanGlobalFilter` checks.
|
|
13
14
|
*
|
|
14
15
|
* @example
|
|
15
16
|
* ```ts
|
|
16
|
-
* const
|
|
17
|
+
* const canGlobalFilter = column_getCanGlobalFilter(column)
|
|
17
18
|
* ```
|
|
18
19
|
*/
|
|
19
20
|
export function column_getCanGlobalFilter<
|
|
@@ -31,13 +32,14 @@ export function column_getCanGlobalFilter<
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
/**
|
|
34
|
-
*
|
|
35
|
+
* Provides the built-in automatic global filter function.
|
|
35
36
|
*
|
|
36
|
-
*
|
|
37
|
+
* Global filtering defaults to `includesString`, which gives search-box style
|
|
38
|
+
* matching across globally filterable columns.
|
|
37
39
|
*
|
|
38
40
|
* @example
|
|
39
41
|
* ```ts
|
|
40
|
-
* const
|
|
42
|
+
* const filterFn = table_getGlobalAutoFilterFn()
|
|
41
43
|
* ```
|
|
42
44
|
*/
|
|
43
45
|
export function table_getGlobalAutoFilterFn() {
|
|
@@ -45,13 +47,15 @@ export function table_getGlobalAutoFilterFn() {
|
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
/**
|
|
48
|
-
*
|
|
50
|
+
* Resolves the filter function used for global filtering.
|
|
49
51
|
*
|
|
50
|
-
*
|
|
52
|
+
* Function-valued `options.globalFilterFn` is returned directly, `'auto'`
|
|
53
|
+
* delegates to `table_getGlobalAutoFilterFn`, and string values are looked up in
|
|
54
|
+
* the table's filter function registry.
|
|
51
55
|
*
|
|
52
56
|
* @example
|
|
53
57
|
* ```ts
|
|
54
|
-
* const
|
|
58
|
+
* const filterFn = table_getGlobalFilterFn(table)
|
|
55
59
|
* ```
|
|
56
60
|
*/
|
|
57
61
|
export function table_getGlobalFilterFn<
|
|
@@ -72,13 +76,14 @@ export function table_getGlobalFilterFn<
|
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
/**
|
|
75
|
-
*
|
|
79
|
+
* Routes a global filter updater through the table's global filter handler.
|
|
76
80
|
*
|
|
77
|
-
* The updater
|
|
81
|
+
* The updater may be a next value or a function of the previous value, matching
|
|
82
|
+
* the instance `table.setGlobalFilter` behavior.
|
|
78
83
|
*
|
|
79
84
|
* @example
|
|
80
85
|
* ```ts
|
|
81
|
-
* table_setGlobalFilter(table,
|
|
86
|
+
* table_setGlobalFilter(table, 'search text')
|
|
82
87
|
* ```
|
|
83
88
|
*/
|
|
84
89
|
export function table_setGlobalFilter<
|
|
@@ -89,9 +94,10 @@ export function table_setGlobalFilter<
|
|
|
89
94
|
}
|
|
90
95
|
|
|
91
96
|
/**
|
|
92
|
-
* Resets the
|
|
97
|
+
* Resets `globalFilter` to the configured initial state or feature default.
|
|
93
98
|
*
|
|
94
|
-
*
|
|
99
|
+
* With no argument, the reset clones `table.initialState.globalFilter`. Passing
|
|
100
|
+
* `true` ignores initial state and resets to `undefined`.
|
|
95
101
|
*
|
|
96
102
|
* @example
|
|
97
103
|
* ```ts
|
|
@@ -13,19 +13,19 @@ export interface TableState_RowExpanding {
|
|
|
13
13
|
|
|
14
14
|
export interface Row_RowExpanding {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Checks whether this row can be expanded.
|
|
17
17
|
*/
|
|
18
18
|
getCanExpand: () => boolean
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Checks whether every ancestor of this row is expanded.
|
|
21
21
|
*/
|
|
22
22
|
getIsAllParentsExpanded: () => boolean
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Checks whether this row is currently expanded.
|
|
25
25
|
*/
|
|
26
26
|
getIsExpanded: () => boolean
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Creates a handler that toggles this row's expanded state.
|
|
29
29
|
*/
|
|
30
30
|
getToggleExpandedHandler: () => () => void
|
|
31
31
|
/**
|
|
@@ -43,7 +43,7 @@ export interface TableOptions_RowExpanding<
|
|
|
43
43
|
*/
|
|
44
44
|
autoResetExpanded?: boolean
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Allows rows with subRows to be expanded.
|
|
47
47
|
*/
|
|
48
48
|
enableExpanding?: boolean
|
|
49
49
|
/**
|
|
@@ -76,32 +76,33 @@ export interface Table_RowExpanding<
|
|
|
76
76
|
> {
|
|
77
77
|
autoResetExpanded: () => void
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* Checks whether at least one row can be expanded.
|
|
80
80
|
*/
|
|
81
81
|
getCanSomeRowsExpand: () => boolean
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* Computes the deepest expanded row id depth.
|
|
84
84
|
*/
|
|
85
85
|
getExpandedDepth: () => number
|
|
86
86
|
/**
|
|
87
|
-
*
|
|
87
|
+
* Checks whether all rows in the current row model are expanded.
|
|
88
88
|
*/
|
|
89
89
|
getIsAllRowsExpanded: () => boolean
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
91
|
+
* Checks whether any row is currently expanded.
|
|
92
92
|
*/
|
|
93
93
|
getIsSomeRowsExpanded: () => boolean
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
95
|
+
* Creates a handler that toggles all rows expanded.
|
|
96
96
|
*/
|
|
97
97
|
getToggleAllRowsExpandedHandler: () => (event: unknown) => void
|
|
98
98
|
/**
|
|
99
|
-
* Resets expanded
|
|
100
|
-
*
|
|
99
|
+
* Resets `expanded` to `initialState.expanded`.
|
|
100
|
+
*
|
|
101
|
+
* Pass `true` to ignore initial state and reset to `{}`.
|
|
101
102
|
*/
|
|
102
103
|
resetExpanded: (defaultState?: boolean) => void
|
|
103
104
|
/**
|
|
104
|
-
*
|
|
105
|
+
* Updates expanded state with `true`, a row-id map, or an updater function.
|
|
105
106
|
*/
|
|
106
107
|
setExpanded: (updater: Updater<ExpandedState>) => void
|
|
107
108
|
/**
|
|
@@ -115,11 +116,11 @@ export interface Table_RowModels_Expanded<
|
|
|
115
116
|
TData extends RowData,
|
|
116
117
|
> {
|
|
117
118
|
/**
|
|
118
|
-
*
|
|
119
|
+
* Resolves the row model after expanded rows have been flattened into view.
|
|
119
120
|
*/
|
|
120
121
|
getExpandedRowModel: () => RowModel<TFeatures, TData>
|
|
121
122
|
/**
|
|
122
|
-
*
|
|
123
|
+
* Reads the row model immediately before expansion.
|
|
123
124
|
*/
|
|
124
125
|
getPreExpandedRowModel: () => RowModel<TFeatures, TData>
|
|
125
126
|
}
|