From 8196a16fba2c0ac51d03e78aadb6d4697ee92353 Mon Sep 17 00:00:00 2001 From: Kevin Van Cott Date: Sat, 16 May 2026 21:41:35 -0500 Subject: [PATCH 1/2] regen static function jsdoc --- .../reference/functions/injectTable.md | 2 +- .../reference/type-aliases/AngularTable.md | 2 +- .../reference/type-aliases/SubscribeSource.md | 2 +- .../index/functions/assignPrototypeAPIs.md | 2 +- .../index/functions/assignTableAPIs.md | 2 +- .../index/functions/callMemoOrStaticFn.md | 2 +- .../index/functions/constructCell.md | 2 +- .../index/functions/constructColumn.md | 2 +- .../constructColumnVisibilityFeature.md | 2 +- .../functions/constructCoreHeadersFeature.md | 2 +- .../index/functions/constructHeader.md | 2 +- .../reference/index/functions/constructRow.md | 2 +- docs/reference/index/functions/flattenBy.md | 2 +- .../index/functions/getFunctionNameInfo.md | 2 +- .../index/functions/getMemoFnMeta.md | 24 --- docs/reference/index/functions/isFunction.md | 2 +- .../index/functions/isNumberArray.md | 24 --- .../index/functions/makeStateUpdater.md | 2 +- docs/reference/index/functions/memo.md | 2 +- docs/reference/index/functions/noop.md | 18 -- docs/reference/index/functions/tableMemo.md | 2 +- docs/reference/index/index.md | 5 - docs/reference/index/interfaces/API.md | 6 +- .../ColumnVisibilityFeatureConstructors.md | 2 +- .../interfaces/Column_ColumnVisibility.md | 10 +- .../CoreHeadersFeatureConstructors.md | 2 +- .../index/interfaces/PrototypeAPI.md | 6 +- .../index/interfaces/Row_ColumnVisibility.md | 16 ++ .../reference/index/type-aliases/APIObject.md | 2 +- .../type-aliases/BuiltInAggregationFn.md | 2 +- .../index/type-aliases/MemoFnMeta.md | 22 -- .../index/type-aliases/PrototypeAPIObject.md | 2 +- .../index/variables/$internalMemoFnMeta.md | 17 -- .../index/variables/aggregationFn_count.md | 2 +- .../index/variables/aggregationFn_extent.md | 2 +- .../index/variables/aggregationFn_max.md | 2 +- .../index/variables/aggregationFn_mean.md | 2 +- .../index/variables/aggregationFn_median.md | 2 +- .../index/variables/aggregationFn_min.md | 2 +- .../index/variables/aggregationFn_sum.md | 2 +- .../index/variables/aggregationFn_unique.md | 2 +- .../variables/aggregationFn_uniqueCount.md | 2 +- .../index/variables/aggregationFns.md | 2 +- .../index/variables/columnSizingFeature.md | 2 +- .../variables/columnVisibilityFeature.md | 2 +- .../index/variables/coreHeadersFeature.md | 2 +- .../functions/cell_getContext.md | 9 +- .../functions/cell_getIsAggregated.md | 9 +- .../functions/cell_getIsGrouped.md | 8 +- .../functions/cell_getIsPlaceholder.md | 9 +- .../functions/cell_getValue.md | 7 +- .../functions/cell_renderValue.md | 9 +- .../functions/column_clearSorting.md | 8 +- .../functions/column_getAfter.md | 9 +- .../functions/column_getAggregationFn.md | 10 +- .../functions/column_getAutoAggregationFn.md | 9 +- .../functions/column_getAutoFilterFn.md | 10 +- .../functions/column_getAutoSortDir.md | 9 +- .../functions/column_getAutoSortFn.md | 10 +- .../functions/column_getCanFilter.md | 9 +- .../functions/column_getCanGlobalFilter.md | 9 +- .../functions/column_getCanGroup.md | 9 +- .../functions/column_getCanHide.md | 8 +- .../functions/column_getCanMultiSort.md | 9 +- .../functions/column_getCanPin.md | 9 +- .../functions/column_getCanResize.md | 9 +- .../functions/column_getCanSort.md | 9 +- .../column_getFacetedMinMaxValues.md | 9 +- .../functions/column_getFacetedRowModel.md | 10 +- .../column_getFacetedUniqueValues.md | 9 +- .../functions/column_getFilterFn.md | 10 +- .../functions/column_getFilterIndex.md | 8 +- .../functions/column_getFilterValue.md | 6 +- .../functions/column_getFirstSortDir.md | 9 +- .../functions/column_getFlatColumns.md | 9 +- .../functions/column_getGroupedIndex.md | 8 +- .../functions/column_getIndex.md | 9 +- .../functions/column_getIsFiltered.md | 9 +- .../functions/column_getIsFirstColumn.md | 8 +- .../functions/column_getIsGrouped.md | 9 +- .../functions/column_getIsLastColumn.md | 8 +- .../functions/column_getIsPinned.md | 9 +- .../functions/column_getIsResizing.md | 8 +- .../functions/column_getIsSorted.md | 7 +- .../functions/column_getIsVisible.md | 10 +- .../functions/column_getLeafColumns.md | 9 +- .../functions/column_getNextSortingOrder.md | 9 +- .../functions/column_getPinnedIndex.md | 9 +- .../functions/column_getSize.md | 9 +- .../functions/column_getSortFn.md | 10 +- .../functions/column_getSortIndex.md | 8 +- .../functions/column_getStart.md | 9 +- .../column_getToggleGroupingHandler.md | 8 +- .../column_getToggleSortingHandler.md | 10 +- .../column_getToggleVisibilityHandler.md | 9 +- .../static-functions/functions/column_pin.md | 8 +- .../functions/column_resetSize.md | 9 +- .../functions/column_setFilterValue.md | 9 +- .../functions/column_toggleGrouping.md | 7 +- .../functions/column_toggleSorting.md | 10 +- .../functions/column_toggleVisibility.md | 7 +- .../functions/getDefaultColumnFiltersState.md | 9 +- .../functions/getDefaultColumnOrderState.md | 9 +- .../functions/getDefaultColumnPinningState.md | 9 +- .../getDefaultColumnResizingState.md | 9 +- .../getDefaultColumnSizingColumnDef.md | 10 +- .../functions/getDefaultColumnSizingState.md | 9 +- .../getDefaultColumnVisibilityState.md | 9 +- .../functions/getDefaultGroupingState.md | 9 +- .../functions/getDefaultPaginationState.md | 9 +- .../functions/getDefaultSortingState.md | 9 +- .../functions/header_getContext.md | 8 +- .../functions/header_getLeafHeaders.md | 9 +- .../functions/header_getResizeHandler.md | 8 +- .../functions/header_getSize.md | 9 +- .../functions/header_getStart.md | 9 +- .../functions/isRowSelected.md | 2 +- .../functions/isSubRowSelected.md | 2 +- .../functions/isTouchStartEvent.md | 7 +- .../functions/orderColumns.md | 10 +- .../functions/passiveEventSupported.md | 5 +- .../functions/row_getAllCells.md | 9 +- .../functions/row_getAllCellsByColumnId.md | 8 +- .../functions/row_getCanPin.md | 2 +- .../functions/row_getCenterVisibleCells.md | 8 +- .../functions/row_getGroupingValue.md | 9 +- .../functions/row_getIsGrouped.md | 8 +- .../functions/row_getIsPinned.md | 2 +- .../functions/row_getLeafRows.md | 8 +- .../functions/row_getLeftVisibleCells.md | 9 +- .../functions/row_getParentRow.md | 9 +- .../functions/row_getParentRows.md | 8 +- .../functions/row_getPinnedIndex.md | 2 +- .../functions/row_getRightVisibleCells.md | 13 +- .../functions/row_getUniqueValues.md | 9 +- .../functions/row_getValue.md | 9 +- .../functions/row_getVisibleCells.md | 9 +- .../row_getVisibleCellsByColumnId.md | 42 ++++ .../static-functions/functions/row_pin.md | 2 +- .../functions/row_renderValue.md | 4 +- .../functions/shouldAutoRemoveFilter.md | 2 +- .../functions/table_autoResetPageIndex.md | 8 +- .../functions/table_firstPage.md | 2 +- .../functions/table_getAllColumns.md | 9 +- .../functions/table_getAllFlatColumns.md | 9 +- .../functions/table_getAllFlatColumnsById.md | 9 +- .../functions/table_getAllLeafColumns.md | 9 +- .../functions/table_getAllLeafColumnsById.md | 9 +- .../functions/table_getBottomRows.md | 2 +- .../functions/table_getCanNextPage.md | 9 +- .../functions/table_getCanPreviousPage.md | 9 +- .../functions/table_getCenterFlatHeaders.md | 12 +- .../functions/table_getCenterFooterGroups.md | 8 +- .../functions/table_getCenterHeaderGroups.md | 9 +- .../functions/table_getCenterLeafColumns.md | 8 +- .../functions/table_getCenterLeafHeaders.md | 8 +- .../functions/table_getCenterRows.md | 2 +- .../functions/table_getCenterTotalSize.md | 8 +- .../table_getCenterVisibleLeafColumns.md | 9 +- .../functions/table_getColumn.md | 9 +- .../functions/table_getCoreRowModel.md | 9 +- .../functions/table_getDefaultColumnDef.md | 10 +- .../functions/table_getExpandedRowModel.md | 9 +- .../functions/table_getFilteredRowModel.md | 10 +- .../functions/table_getFlatHeaders.md | 9 +- .../functions/table_getFooterGroups.md | 9 +- .../functions/table_getGlobalAutoFilterFn.md | 9 +- .../table_getGlobalFacetedMinMaxValues.md | 9 +- .../table_getGlobalFacetedRowModel.md | 10 +- .../table_getGlobalFacetedUniqueValues.md | 9 +- .../functions/table_getGlobalFilterFn.md | 10 +- .../functions/table_getGroupedRowModel.md | 9 +- .../functions/table_getHeaderGroups.md | 9 +- .../functions/table_getIsAllColumnsVisible.md | 9 +- .../functions/table_getIsSomeColumnsPinned.md | 9 +- .../table_getIsSomeColumnsVisible.md | 8 +- .../functions/table_getLeafHeaders.md | 13 +- .../functions/table_getLeftFlatHeaders.md | 12 +- .../functions/table_getLeftFooterGroups.md | 8 +- .../functions/table_getLeftHeaderGroups.md | 9 +- .../functions/table_getLeftLeafColumns.md | 9 +- .../functions/table_getLeftLeafHeaders.md | 8 +- .../functions/table_getLeftTotalSize.md | 8 +- .../table_getLeftVisibleLeafColumns.md | 8 +- .../functions/table_getOrderColumnsFn.md | 9 +- .../functions/table_getPageCount.md | 9 +- .../functions/table_getPageOptions.md | 9 +- .../functions/table_getPaginatedRowModel.md | 10 +- .../functions/table_getPinnedLeafColumns.md | 9 +- .../table_getPinnedVisibleLeafColumns.md | 9 +- .../functions/table_getPreExpandedRowModel.md | 8 +- .../functions/table_getPreFilteredRowModel.md | 9 +- .../functions/table_getPreGroupedRowModel.md | 8 +- .../table_getPrePaginatedRowModel.md | 9 +- .../functions/table_getPreSortedRowModel.md | 8 +- .../functions/table_getRightFlatHeaders.md | 12 +- .../functions/table_getRightFooterGroups.md | 8 +- .../functions/table_getRightHeaderGroups.md | 9 +- .../functions/table_getRightLeafColumns.md | 9 +- .../functions/table_getRightLeafHeaders.md | 8 +- .../functions/table_getRightTotalSize.md | 8 +- .../table_getRightVisibleLeafColumns.md | 8 +- .../functions/table_getRow.md | 9 +- .../functions/table_getRowCount.md | 10 +- .../functions/table_getRowId.md | 9 +- .../functions/table_getRowModel.md | 9 +- .../functions/table_getSortedRowModel.md | 10 +- ...le_getToggleAllColumnsVisibilityHandler.md | 9 +- .../functions/table_getTopRows.md | 2 +- .../functions/table_getTotalSize.md | 8 +- .../functions/table_getVisibleFlatColumns.md | 9 +- .../functions/table_getVisibleLeafColumns.md | 9 +- .../functions/table_lastPage.md | 2 +- .../functions/table_mergeOptions.md | 4 +- .../functions/table_nextPage.md | 2 +- .../functions/table_previousPage.md | 2 +- .../functions/table_resetColumnFilters.md | 7 +- .../functions/table_resetColumnOrder.md | 7 +- .../functions/table_resetColumnPinning.md | 8 +- .../functions/table_resetColumnSizing.md | 7 +- .../functions/table_resetColumnVisibility.md | 7 +- .../functions/table_resetGlobalFilter.md | 7 +- .../functions/table_resetGrouping.md | 7 +- .../functions/table_resetHeaderSizeInfo.md | 8 +- .../functions/table_resetPageIndex.md | 7 +- .../functions/table_resetPageSize.md | 7 +- .../functions/table_resetPagination.md | 8 +- .../functions/table_resetSorting.md | 7 +- .../functions/table_setColumnFilters.md | 10 +- .../functions/table_setColumnOrder.md | 9 +- .../functions/table_setColumnPinning.md | 9 +- .../functions/table_setColumnResizing.md | 9 +- .../functions/table_setColumnSizing.md | 9 +- .../functions/table_setColumnVisibility.md | 9 +- .../functions/table_setGlobalFilter.md | 9 +- .../functions/table_setGrouping.md | 9 +- .../functions/table_setOptions.md | 2 +- .../functions/table_setPageIndex.md | 7 +- .../functions/table_setPageSize.md | 7 +- .../functions/table_setPagination.md | 8 +- .../functions/table_setSorting.md | 9 +- .../table_syncExternalStateToBaseAtoms.md | 2 +- .../table_toggleAllColumnsVisible.md | 6 +- docs/reference/static-functions/index.md | 1 + .../src/core/cells/coreCellsFeature.utils.ts | 19 +- .../core/columns/coreColumnsFeature.utils.ts | 64 +++--- .../core/headers/coreHeadersFeature.utils.ts | 41 ++-- .../row-models/coreRowModelsFeature.utils.ts | 84 ++++---- .../src/core/rows/coreRowsFeature.utils.ts | 62 +++--- .../src/core/table/coreTablesFeature.utils.ts | 4 +- .../columnFacetingFeature.utils.ts | 44 ++-- .../columnFilteringFeature.utils.ts | 67 +++--- .../columnGroupingFeature.utils.ts | 98 +++++---- .../columnOrderingFeature.utils.ts | 53 +++-- .../columnPinningFeature.utils.ts | 202 ++++++++++-------- .../columnResizingFeature.utils.ts | 47 ++-- .../columnSizingFeature.utils.ts | 93 ++++---- .../columnVisibilityFeature.utils.ts | 96 +++++---- .../globalFilteringFeature.utils.ts | 34 +-- .../rowPaginationFeature.utils.ts | 81 ++++--- .../row-sorting/rowSortingFeature.utils.ts | 103 +++++---- 261 files changed, 1666 insertions(+), 1385 deletions(-) delete mode 100644 docs/reference/index/functions/getMemoFnMeta.md delete mode 100644 docs/reference/index/functions/isNumberArray.md delete mode 100644 docs/reference/index/functions/noop.md delete mode 100644 docs/reference/index/type-aliases/MemoFnMeta.md delete mode 100644 docs/reference/index/variables/$internalMemoFnMeta.md create mode 100644 docs/reference/static-functions/functions/row_getVisibleCellsByColumnId.md diff --git a/docs/framework/angular/reference/functions/injectTable.md b/docs/framework/angular/reference/functions/injectTable.md index 5d145f1eeb..0ff8f15357 100644 --- a/docs/framework/angular/reference/functions/injectTable.md +++ b/docs/framework/angular/reference/functions/injectTable.md @@ -9,7 +9,7 @@ title: injectTable function injectTable(options): AngularTable; ``` -Defined in: [packages/angular-table/src/injectTable.ts:91](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L91) +Defined in: [packages/angular-table/src/injectTable.ts:92](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L92) Creates and returns an Angular-reactive table instance. diff --git a/docs/framework/angular/reference/type-aliases/AngularTable.md b/docs/framework/angular/reference/type-aliases/AngularTable.md index c93ccd752f..41e91ea224 100644 --- a/docs/framework/angular/reference/type-aliases/AngularTable.md +++ b/docs/framework/angular/reference/type-aliases/AngularTable.md @@ -9,7 +9,7 @@ title: AngularTable type AngularTable = Table; ``` -Defined in: [packages/angular-table/src/injectTable.ts:30](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L30) +Defined in: [packages/angular-table/src/injectTable.ts:31](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L31) ## Type Parameters diff --git a/docs/framework/angular/reference/type-aliases/SubscribeSource.md b/docs/framework/angular/reference/type-aliases/SubscribeSource.md index fb280a2413..7b27774494 100644 --- a/docs/framework/angular/reference/type-aliases/SubscribeSource.md +++ b/docs/framework/angular/reference/type-aliases/SubscribeSource.md @@ -13,7 +13,7 @@ type SubscribeSource = | ReadonlyStore; ``` -Defined in: [packages/angular-table/src/injectTable.ts:24](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L24) +Defined in: [packages/angular-table/src/injectTable.ts:25](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L25) ## Type Parameters diff --git a/docs/reference/index/functions/assignPrototypeAPIs.md b/docs/reference/index/functions/assignPrototypeAPIs.md index c2576f8699..13377f6ad9 100644 --- a/docs/reference/index/functions/assignPrototypeAPIs.md +++ b/docs/reference/index/functions/assignPrototypeAPIs.md @@ -13,7 +13,7 @@ function assignPrototypeAPIs( apis): void; ``` -Defined in: [utils.ts:403](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L403) +Defined in: [utils.ts:378](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L378) Assigns API methods to a prototype object for memory-efficient method sharing. All instances created with this prototype will share the same method references. diff --git a/docs/reference/index/functions/assignTableAPIs.md b/docs/reference/index/functions/assignTableAPIs.md index ad5eb72d3e..e57405c7e2 100644 --- a/docs/reference/index/functions/assignTableAPIs.md +++ b/docs/reference/index/functions/assignTableAPIs.md @@ -12,7 +12,7 @@ function assignTableAPIs( apis): void; ``` -Defined in: [utils.ts:361](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L361) +Defined in: [utils.ts:336](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L336) Assigns Table API methods directly to the table instance. Unlike row/cell/column/header, the table is a singleton so methods are assigned directly. diff --git a/docs/reference/index/functions/callMemoOrStaticFn.md b/docs/reference/index/functions/callMemoOrStaticFn.md index a0947c8ca5..c66df8423c 100644 --- a/docs/reference/index/functions/callMemoOrStaticFn.md +++ b/docs/reference/index/functions/callMemoOrStaticFn.md @@ -13,7 +13,7 @@ function callMemoOrStaticFn( args): ReturnType; ``` -Defined in: [utils.ts:451](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L451) +Defined in: [utils.ts:424](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L424) Looks to run the memoized function with the builder pattern on the object if it exists, otherwise fallback to the static method passed in. diff --git a/docs/reference/index/functions/constructCell.md b/docs/reference/index/functions/constructCell.md index 4992d00fc8..c95cb2b0fa 100644 --- a/docs/reference/index/functions/constructCell.md +++ b/docs/reference/index/functions/constructCell.md @@ -12,7 +12,7 @@ function constructCell( table): Cell; ``` -Defined in: [core/cells/constructCell.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/constructCell.ts#L31) +Defined in: [core/cells/constructCell.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/constructCell.ts#L32) Constructs a cell instance from normalized table internals. diff --git a/docs/reference/index/functions/constructColumn.md b/docs/reference/index/functions/constructColumn.md index d80028439c..c76a950bf2 100644 --- a/docs/reference/index/functions/constructColumn.md +++ b/docs/reference/index/functions/constructColumn.md @@ -13,7 +13,7 @@ function constructColumn( parent?): Column; ``` -Defined in: [core/columns/constructColumn.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/constructColumn.ts#L35) +Defined in: [core/columns/constructColumn.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/constructColumn.ts#L36) Constructs a column instance from normalized table internals. diff --git a/docs/reference/index/functions/constructColumnVisibilityFeature.md b/docs/reference/index/functions/constructColumnVisibilityFeature.md index e7d56b0b85..9b2dd8e8e3 100644 --- a/docs/reference/index/functions/constructColumnVisibilityFeature.md +++ b/docs/reference/index/functions/constructColumnVisibilityFeature.md @@ -9,7 +9,7 @@ title: constructColumnVisibilityFeature function constructColumnVisibilityFeature(): TableFeature>; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts#L50) +Defined in: [features/column-visibility/columnVisibilityFeature.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts#L51) Creates the stock column visibility feature. diff --git a/docs/reference/index/functions/constructCoreHeadersFeature.md b/docs/reference/index/functions/constructCoreHeadersFeature.md index 03588dd9e8..9688ad573e 100644 --- a/docs/reference/index/functions/constructCoreHeadersFeature.md +++ b/docs/reference/index/functions/constructCoreHeadersFeature.md @@ -9,7 +9,7 @@ title: constructCoreHeadersFeature function constructCoreHeadersFeature(): TableFeature>; ``` -Defined in: [core/headers/coreHeadersFeature.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.ts#L36) +Defined in: [core/headers/coreHeadersFeature.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.ts#L27) Creates the stock core headers feature. diff --git a/docs/reference/index/functions/constructHeader.md b/docs/reference/index/functions/constructHeader.md index 4aac187c9d..3e13746295 100644 --- a/docs/reference/index/functions/constructHeader.md +++ b/docs/reference/index/functions/constructHeader.md @@ -12,7 +12,7 @@ function constructHeader( options): Header; ``` -Defined in: [core/headers/constructHeader.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/constructHeader.ts#L30) +Defined in: [core/headers/constructHeader.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/constructHeader.ts#L31) Constructs a header instance from normalized table internals. diff --git a/docs/reference/index/functions/constructRow.md b/docs/reference/index/functions/constructRow.md index 7e3c131e03..a122c90369 100644 --- a/docs/reference/index/functions/constructRow.md +++ b/docs/reference/index/functions/constructRow.md @@ -16,7 +16,7 @@ function constructRow( parentId?): Row; ``` -Defined in: [core/rows/constructRow.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/constructRow.ts#L29) +Defined in: [core/rows/constructRow.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/constructRow.ts#L30) Constructs a row instance from normalized table internals. diff --git a/docs/reference/index/functions/flattenBy.md b/docs/reference/index/functions/flattenBy.md index a67cf48855..190a23a4c8 100644 --- a/docs/reference/index/functions/flattenBy.md +++ b/docs/reference/index/functions/flattenBy.md @@ -9,7 +9,7 @@ title: flattenBy function flattenBy(arr, getChildren): TNode[]; ``` -Defined in: [utils.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L88) +Defined in: [utils.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L78) Flattens a tree of nodes by recursively reading child nodes. diff --git a/docs/reference/index/functions/getFunctionNameInfo.md b/docs/reference/index/functions/getFunctionNameInfo.md index ddda930829..f0c914d94b 100644 --- a/docs/reference/index/functions/getFunctionNameInfo.md +++ b/docs/reference/index/functions/getFunctionNameInfo.md @@ -9,7 +9,7 @@ title: getFunctionNameInfo function getFunctionNameInfo(staticFnName, splitBy): object; ``` -Defined in: [utils.ts:344](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L344) +Defined in: [utils.ts:319](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L319) Assumes that a function name is in the format of `parentName_fnKey` and returns the `fnKey` and `fnName` in the format of `parentName.fnKey`. diff --git a/docs/reference/index/functions/getMemoFnMeta.md b/docs/reference/index/functions/getMemoFnMeta.md deleted file mode 100644 index a3ef66ef4c..0000000000 --- a/docs/reference/index/functions/getMemoFnMeta.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -id: getMemoFnMeta -title: getMemoFnMeta ---- - -# Function: getMemoFnMeta() - -```ts -function getMemoFnMeta(fn): MemoFnMeta | null; -``` - -Defined in: [utils.ts:128](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L128) - -**`Internal`** - -## Parameters - -### fn - -`any` - -## Returns - -[`MemoFnMeta`](../type-aliases/MemoFnMeta.md) \| `null` diff --git a/docs/reference/index/functions/isFunction.md b/docs/reference/index/functions/isFunction.md index 9019cd7175..05f597d48d 100644 --- a/docs/reference/index/functions/isFunction.md +++ b/docs/reference/index/functions/isFunction.md @@ -9,7 +9,7 @@ title: isFunction function isFunction(d): d is T; ``` -Defined in: [utils.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L72) +Defined in: [utils.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L69) Returns whether a value is a function. diff --git a/docs/reference/index/functions/isNumberArray.md b/docs/reference/index/functions/isNumberArray.md deleted file mode 100644 index 8ca5a104cf..0000000000 --- a/docs/reference/index/functions/isNumberArray.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -id: isNumberArray -title: isNumberArray ---- - -# Function: isNumberArray() - -```ts -function isNumberArray(d): d is number[]; -``` - -Defined in: [utils.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L79) - -Returns whether a value is an array containing only numbers. - -## Parameters - -### d - -`any` - -## Returns - -`d is number[]` diff --git a/docs/reference/index/functions/makeStateUpdater.md b/docs/reference/index/functions/makeStateUpdater.md index c4ad45d9e3..bbd2bee1b7 100644 --- a/docs/reference/index/functions/makeStateUpdater.md +++ b/docs/reference/index/functions/makeStateUpdater.md @@ -9,7 +9,7 @@ title: makeStateUpdater function makeStateUpdater(key, instance): (updater) => void; ``` -Defined in: [utils.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L56) +Defined in: [utils.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L53) Creates a table state updater for a single state slice. diff --git a/docs/reference/index/functions/memo.md b/docs/reference/index/functions/memo.md index 2aa9aea559..044a529da6 100644 --- a/docs/reference/index/functions/memo.md +++ b/docs/reference/index/functions/memo.md @@ -9,7 +9,7 @@ title: memo function memo(__namedParameters): (depArgs?) => TResult; ``` -Defined in: [utils.ts:146](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L146) +Defined in: [utils.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L113) Creates a dependency-tracked memoized function for table internals. diff --git a/docs/reference/index/functions/noop.md b/docs/reference/index/functions/noop.md deleted file mode 100644 index e3df388d7d..0000000000 --- a/docs/reference/index/functions/noop.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -id: noop -title: noop ---- - -# Function: noop() - -```ts -function noop(): void; -``` - -Defined in: [utils.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L49) - -A no-operation function used as a safe default callback. - -## Returns - -`void` diff --git a/docs/reference/index/functions/tableMemo.md b/docs/reference/index/functions/tableMemo.md index c20b326702..3697a20d1e 100644 --- a/docs/reference/index/functions/tableMemo.md +++ b/docs/reference/index/functions/tableMemo.md @@ -9,7 +9,7 @@ title: tableMemo function tableMemo(__namedParameters): (depArgs?) => TResult; ``` -Defined in: [utils.ts:212](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L212) +Defined in: [utils.ts:182](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L182) Creates a table-aware memoized function. diff --git a/docs/reference/index/index.md b/docs/reference/index/index.md index a1b4d7fe2c..1650494f9b 100644 --- a/docs/reference/index/index.md +++ b/docs/reference/index/index.md @@ -281,7 +281,6 @@ title: index - [HeaderGroup](type-aliases/HeaderGroup.md) - [IdentifiedColumnDef](type-aliases/IdentifiedColumnDef.md) - [InitRowInstanceData](type-aliases/InitRowInstanceData.md) -- [MemoFnMeta](type-aliases/MemoFnMeta.md) - [NoInfer](type-aliases/NoInfer.md) - [OnChangeFn](type-aliases/OnChangeFn.md) - [PartialKeys](type-aliases/PartialKeys.md) @@ -313,7 +312,6 @@ title: index ## Variables -- [$internalMemoFnMeta](variables/$internalMemoFnMeta.md) - [aggregationFn\_count](variables/aggregationFn_count.md) - [aggregationFn\_extent](variables/aggregationFn_extent.md) - [aggregationFn\_max](variables/aggregationFn_max.md) @@ -418,12 +416,9 @@ title: index - [functionalUpdate](functions/functionalUpdate.md) - [getFunctionNameInfo](functions/getFunctionNameInfo.md) - [getInitialTableState](functions/getInitialTableState.md) -- [getMemoFnMeta](functions/getMemoFnMeta.md) - [isFunction](functions/isFunction.md) -- [isNumberArray](functions/isNumberArray.md) - [makeStateUpdater](functions/makeStateUpdater.md) - [memo](functions/memo.md) -- [noop](functions/noop.md) - [tableFeatures](functions/tableFeatures.md) - [tableMemo](functions/tableMemo.md) - [tableOptions](functions/tableOptions.md) diff --git a/docs/reference/index/interfaces/API.md b/docs/reference/index/interfaces/API.md index 2bb9dbaab6..731d88b86c 100644 --- a/docs/reference/index/interfaces/API.md +++ b/docs/reference/index/interfaces/API.md @@ -5,7 +5,7 @@ title: API # Interface: API\ -Defined in: [utils.ts:331](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L331) +Defined in: [utils.ts:306](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L306) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [utils.ts:331](https://github.com/TanStack/table/blob/main/packages/ fn: (...args) => any; ``` -Defined in: [utils.ts:332](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L332) +Defined in: [utils.ts:307](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L307) #### Parameters @@ -45,7 +45,7 @@ Defined in: [utils.ts:332](https://github.com/TanStack/table/blob/main/packages/ optional memoDeps: (depArgs?) => any[] | undefined; ``` -Defined in: [utils.ts:333](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L333) +Defined in: [utils.ts:308](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L308) #### Parameters diff --git a/docs/reference/index/interfaces/ColumnVisibilityFeatureConstructors.md b/docs/reference/index/interfaces/ColumnVisibilityFeatureConstructors.md index e8d3c32160..c2ace874da 100644 --- a/docs/reference/index/interfaces/ColumnVisibilityFeatureConstructors.md +++ b/docs/reference/index/interfaces/ColumnVisibilityFeatureConstructors.md @@ -5,7 +5,7 @@ title: ColumnVisibilityFeatureConstructors # Interface: ColumnVisibilityFeatureConstructors\ -Defined in: [features/column-visibility/columnVisibilityFeature.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts#L33) +Defined in: [features/column-visibility/columnVisibilityFeature.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts#L34) ## Type Parameters diff --git a/docs/reference/index/interfaces/Column_ColumnVisibility.md b/docs/reference/index/interfaces/Column_ColumnVisibility.md index 0d777f674f..e126fe381d 100644 --- a/docs/reference/index/interfaces/Column_ColumnVisibility.md +++ b/docs/reference/index/interfaces/Column_ColumnVisibility.md @@ -5,7 +5,7 @@ title: Column_ColumnVisibility # Interface: Column\_ColumnVisibility -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L85) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L92) ## Properties @@ -15,7 +15,7 @@ Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:85](htt getCanHide: () => boolean; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L89) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L96) Returns whether the column can be hidden @@ -31,7 +31,7 @@ Returns whether the column can be hidden getIsVisible: () => boolean; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L93) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L100) Returns whether the column is visible @@ -47,7 +47,7 @@ Returns whether the column is visible getToggleVisibilityHandler: () => (event) => void; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L97) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L104) Returns a function that can be used to toggle the column visibility. This function can be used to bind to an event handler to a checkbox. @@ -75,7 +75,7 @@ Returns a function that can be used to toggle the column visibility. This functi toggleVisibility: (value?) => void; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L101) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L108) Toggles the visibility of the column. diff --git a/docs/reference/index/interfaces/CoreHeadersFeatureConstructors.md b/docs/reference/index/interfaces/CoreHeadersFeatureConstructors.md index 8ae4912b7a..e0545b821c 100644 --- a/docs/reference/index/interfaces/CoreHeadersFeatureConstructors.md +++ b/docs/reference/index/interfaces/CoreHeadersFeatureConstructors.md @@ -5,7 +5,7 @@ title: CoreHeadersFeatureConstructors # Interface: CoreHeadersFeatureConstructors\ -Defined in: [core/headers/coreHeadersFeature.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.ts#L23) +Defined in: [core/headers/coreHeadersFeature.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.ts#L14) ## Type Parameters diff --git a/docs/reference/index/interfaces/PrototypeAPI.md b/docs/reference/index/interfaces/PrototypeAPI.md index 0258cf4655..05f7ab603d 100644 --- a/docs/reference/index/interfaces/PrototypeAPI.md +++ b/docs/reference/index/interfaces/PrototypeAPI.md @@ -5,7 +5,7 @@ title: PrototypeAPI # Interface: PrototypeAPI\ -Defined in: [utils.ts:386](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L386) +Defined in: [utils.ts:361](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L361) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [utils.ts:386](https://github.com/TanStack/table/blob/main/packages/ fn: (self, ...args) => any; ``` -Defined in: [utils.ts:387](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L387) +Defined in: [utils.ts:362](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L362) #### Parameters @@ -49,7 +49,7 @@ Defined in: [utils.ts:387](https://github.com/TanStack/table/blob/main/packages/ optional memoDeps: (self, depArgs?) => any[] | undefined; ``` -Defined in: [utils.ts:388](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L388) +Defined in: [utils.ts:363](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L363) #### Parameters diff --git a/docs/reference/index/interfaces/Row_ColumnVisibility.md b/docs/reference/index/interfaces/Row_ColumnVisibility.md index 247989f1be..a9537b1b4b 100644 --- a/docs/reference/index/interfaces/Row_ColumnVisibility.md +++ b/docs/reference/index/interfaces/Row_ColumnVisibility.md @@ -32,3 +32,19 @@ Returns an array of cells that account for column visibility for the row. #### Returns [`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] + +*** + +### getVisibleCellsByColumnId() + +```ts +getVisibleCellsByColumnId: () => Record>; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L86) + +Returns visible cells by column id for the row. + +#### Returns + +`Record`\<`string`, [`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>\> diff --git a/docs/reference/index/type-aliases/APIObject.md b/docs/reference/index/type-aliases/APIObject.md index a7cf64ba72..6929b3d98e 100644 --- a/docs/reference/index/type-aliases/APIObject.md +++ b/docs/reference/index/type-aliases/APIObject.md @@ -9,7 +9,7 @@ title: APIObject type APIObject = Record>; ``` -Defined in: [utils.ts:336](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L336) +Defined in: [utils.ts:311](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L311) ## Type Parameters diff --git a/docs/reference/index/type-aliases/BuiltInAggregationFn.md b/docs/reference/index/type-aliases/BuiltInAggregationFn.md index 6ea1c52e5a..e7211de73c 100644 --- a/docs/reference/index/type-aliases/BuiltInAggregationFn.md +++ b/docs/reference/index/type-aliases/BuiltInAggregationFn.md @@ -9,4 +9,4 @@ title: BuiltInAggregationFn type BuiltInAggregationFn = keyof typeof aggregationFns; ``` -Defined in: [fns/aggregationFns.ts:225](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L225) +Defined in: [fns/aggregationFns.ts:237](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L237) diff --git a/docs/reference/index/type-aliases/MemoFnMeta.md b/docs/reference/index/type-aliases/MemoFnMeta.md deleted file mode 100644 index 14ed5b713f..0000000000 --- a/docs/reference/index/type-aliases/MemoFnMeta.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -id: MemoFnMeta -title: MemoFnMeta ---- - -# Type Alias: MemoFnMeta - -```ts -type MemoFnMeta = object; -``` - -Defined in: [utils.ts:116](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L116) - -## Properties - -### originalArgsLength? - -```ts -optional originalArgsLength: number; -``` - -Defined in: [utils.ts:116](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L116) diff --git a/docs/reference/index/type-aliases/PrototypeAPIObject.md b/docs/reference/index/type-aliases/PrototypeAPIObject.md index 8b0f5b650c..5d3af6aafe 100644 --- a/docs/reference/index/type-aliases/PrototypeAPIObject.md +++ b/docs/reference/index/type-aliases/PrototypeAPIObject.md @@ -9,7 +9,7 @@ title: PrototypeAPIObject type PrototypeAPIObject = Record>; ``` -Defined in: [utils.ts:391](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L391) +Defined in: [utils.ts:366](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L366) ## Type Parameters diff --git a/docs/reference/index/variables/$internalMemoFnMeta.md b/docs/reference/index/variables/$internalMemoFnMeta.md deleted file mode 100644 index f4de9a3285..0000000000 --- a/docs/reference/index/variables/$internalMemoFnMeta.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -id: $internalMemoFnMeta -title: $internalMemoFnMeta ---- - -# Variable: $internalMemoFnMeta - -```ts -const $internalMemoFnMeta: typeof $internalMemoFnMeta; -``` - -Defined in: [utils.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L115) - -Symbol used to attach internal memo metadata to wrapped functions. - -This is exported so diagnostics can recognize memoized functions without -depending on a string property name. diff --git a/docs/reference/index/variables/aggregationFn_count.md b/docs/reference/index/variables/aggregationFn_count.md index 0e0cda2e76..c0235a22f7 100644 --- a/docs/reference/index/variables/aggregationFn_count.md +++ b/docs/reference/index/variables/aggregationFn_count.md @@ -9,6 +9,6 @@ title: aggregationFn_count const aggregationFn_count: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:198](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L198) +Defined in: [fns/aggregationFns.ts:210](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L210) Aggregation function for counting the number of rows in a column. diff --git a/docs/reference/index/variables/aggregationFn_extent.md b/docs/reference/index/variables/aggregationFn_extent.md index 0bb994ef84..fcbd9ceca0 100644 --- a/docs/reference/index/variables/aggregationFn_extent.md +++ b/docs/reference/index/variables/aggregationFn_extent.md @@ -9,6 +9,6 @@ title: aggregationFn_extent const aggregationFn_extent: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L84) +Defined in: [fns/aggregationFns.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L83) Aggregation function for finding the extent (min and max) of a column. diff --git a/docs/reference/index/variables/aggregationFn_max.md b/docs/reference/index/variables/aggregationFn_max.md index 443b999581..9b85faaab4 100644 --- a/docs/reference/index/variables/aggregationFn_max.md +++ b/docs/reference/index/variables/aggregationFn_max.md @@ -9,6 +9,6 @@ title: aggregationFn_max const aggregationFn_max: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L57) +Defined in: [fns/aggregationFns.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L56) Aggregation function for finding the maximum value of a column. diff --git a/docs/reference/index/variables/aggregationFn_mean.md b/docs/reference/index/variables/aggregationFn_mean.md index 321b066014..19c49f6a68 100644 --- a/docs/reference/index/variables/aggregationFn_mean.md +++ b/docs/reference/index/variables/aggregationFn_mean.md @@ -9,6 +9,6 @@ title: aggregationFn_mean const aggregationFn_mean: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L113) +Defined in: [fns/aggregationFns.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L112) Aggregation function for finding the mean (average) of a column. diff --git a/docs/reference/index/variables/aggregationFn_median.md b/docs/reference/index/variables/aggregationFn_median.md index 38a7925adb..fe6fcf947a 100644 --- a/docs/reference/index/variables/aggregationFn_median.md +++ b/docs/reference/index/variables/aggregationFn_median.md @@ -9,6 +9,6 @@ title: aggregationFn_median const aggregationFn_median: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:145](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L145) +Defined in: [fns/aggregationFns.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L144) Aggregation function for finding the median value of a column. diff --git a/docs/reference/index/variables/aggregationFn_min.md b/docs/reference/index/variables/aggregationFn_min.md index b5ceab3d37..c5c893c5a9 100644 --- a/docs/reference/index/variables/aggregationFn_min.md +++ b/docs/reference/index/variables/aggregationFn_min.md @@ -9,6 +9,6 @@ title: aggregationFn_min const aggregationFn_min: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L29) +Defined in: [fns/aggregationFns.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L28) Aggregation function for finding the minimum value of a column. diff --git a/docs/reference/index/variables/aggregationFn_sum.md b/docs/reference/index/variables/aggregationFn_sum.md index aeece8ec0a..93c85c1a2d 100644 --- a/docs/reference/index/variables/aggregationFn_sum.md +++ b/docs/reference/index/variables/aggregationFn_sum.md @@ -9,6 +9,6 @@ title: aggregationFn_sum const aggregationFn_sum: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L10) +Defined in: [fns/aggregationFns.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L9) Aggregation function for summing up the values of a column. diff --git a/docs/reference/index/variables/aggregationFn_unique.md b/docs/reference/index/variables/aggregationFn_unique.md index d04181e153..d7933949d1 100644 --- a/docs/reference/index/variables/aggregationFn_unique.md +++ b/docs/reference/index/variables/aggregationFn_unique.md @@ -9,6 +9,6 @@ title: aggregationFn_unique const aggregationFn_unique: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:172](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L172) +Defined in: [fns/aggregationFns.ts:176](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L176) Aggregation function for finding the unique values of a column. diff --git a/docs/reference/index/variables/aggregationFn_uniqueCount.md b/docs/reference/index/variables/aggregationFn_uniqueCount.md index f45e125c82..bafb8fb233 100644 --- a/docs/reference/index/variables/aggregationFn_uniqueCount.md +++ b/docs/reference/index/variables/aggregationFn_uniqueCount.md @@ -9,6 +9,6 @@ title: aggregationFn_uniqueCount const aggregationFn_uniqueCount: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:185](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L185) +Defined in: [fns/aggregationFns.ts:193](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L193) Aggregation function for finding the count of unique values of a column. diff --git a/docs/reference/index/variables/aggregationFns.md b/docs/reference/index/variables/aggregationFns.md index 55549b6a84..015004e72e 100644 --- a/docs/reference/index/variables/aggregationFns.md +++ b/docs/reference/index/variables/aggregationFns.md @@ -9,7 +9,7 @@ title: aggregationFns const aggregationFns: object; ``` -Defined in: [fns/aggregationFns.ts:213](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L213) +Defined in: [fns/aggregationFns.ts:225](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L225) The built-in aggregation function registry. diff --git a/docs/reference/index/variables/columnSizingFeature.md b/docs/reference/index/variables/columnSizingFeature.md index f8dd09ec27..8c43c053cb 100644 --- a/docs/reference/index/variables/columnSizingFeature.md +++ b/docs/reference/index/variables/columnSizingFeature.md @@ -9,7 +9,7 @@ title: columnSizingFeature const columnSizingFeature: TableFeature>; ``` -Defined in: [features/column-sizing/columnSizingFeature.ts:166](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.ts#L166) +Defined in: [features/column-sizing/columnSizingFeature.ts:182](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.ts#L182) The stock column sizing feature. diff --git a/docs/reference/index/variables/columnVisibilityFeature.md b/docs/reference/index/variables/columnVisibilityFeature.md index 9b548f14b6..42e323c8ad 100644 --- a/docs/reference/index/variables/columnVisibilityFeature.md +++ b/docs/reference/index/variables/columnVisibilityFeature.md @@ -9,7 +9,7 @@ title: columnVisibilityFeature const columnVisibilityFeature: TableFeature>; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.ts:151](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts#L151) +Defined in: [features/column-visibility/columnVisibilityFeature.ts:159](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts#L159) The stock column visibility feature. diff --git a/docs/reference/index/variables/coreHeadersFeature.md b/docs/reference/index/variables/coreHeadersFeature.md index 5d9294526a..0b8a000117 100644 --- a/docs/reference/index/variables/coreHeadersFeature.md +++ b/docs/reference/index/variables/coreHeadersFeature.md @@ -9,6 +9,6 @@ title: coreHeadersFeature const coreHeadersFeature: TableFeature>; ``` -Defined in: [core/headers/coreHeadersFeature.ts:103](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.ts#L103) +Defined in: [core/headers/coreHeadersFeature.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.ts#L78) The Core Headers feature provides the core header functionality. diff --git a/docs/reference/static-functions/functions/cell_getContext.md b/docs/reference/static-functions/functions/cell_getContext.md index 287ceaeb17..8fd5ff33e4 100644 --- a/docs/reference/static-functions/functions/cell_getContext.md +++ b/docs/reference/static-functions/functions/cell_getContext.md @@ -9,11 +9,12 @@ title: cell_getContext function cell_getContext(cell): object; ``` -Defined in: [core/cells/coreCellsFeature.utils.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L51) +Defined in: [core/cells/coreCellsFeature.utils.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L54) -Returns context for a cell. +Builds the render context passed to a column's `cell` template. -This is the static implementation behind the matching cell instance API and uses the owning row and column context. +The returned object includes stable references to the table, row, column, and +cell, plus bound `getValue` and `renderValue` helpers for render functions. ## Type Parameters @@ -86,5 +87,5 @@ table: Table_Internal = cell.table; ## Example ```ts -const value = cell_getContext(cell) +const context = cell_getContext(cell) ``` diff --git a/docs/reference/static-functions/functions/cell_getIsAggregated.md b/docs/reference/static-functions/functions/cell_getIsAggregated.md index c808d370f8..95d2ff0707 100644 --- a/docs/reference/static-functions/functions/cell_getIsAggregated.md +++ b/docs/reference/static-functions/functions/cell_getIsAggregated.md @@ -9,11 +9,12 @@ title: cell_getIsAggregated function cell_getIsAggregated(cell): boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:333](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L333) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:345](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L345) -Returns is aggregated for a cell. +Checks whether this cell should render an aggregated value. -This is the static implementation behind the matching cell instance API and uses the owning row and column context. +Aggregated cells are non-placeholder, non-grouped cells on rows that have +subRows. ## Type Parameters @@ -42,5 +43,5 @@ This is the static implementation behind the matching cell instance API and uses ## Example ```ts -const value = cell_getIsAggregated(cell) +const isAggregated = cell_getIsAggregated(cell) ``` diff --git a/docs/reference/static-functions/functions/cell_getIsGrouped.md b/docs/reference/static-functions/functions/cell_getIsGrouped.md index 4ab3c7c65a..2ff3c55ff6 100644 --- a/docs/reference/static-functions/functions/cell_getIsGrouped.md +++ b/docs/reference/static-functions/functions/cell_getIsGrouped.md @@ -9,11 +9,11 @@ title: cell_getIsGrouped function cell_getIsGrouped(cell): boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:294](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L294) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:304](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L304) -Returns is grouped for a cell. +Checks whether this cell represents the grouped column for a grouped row. -This is the static implementation behind the matching cell instance API and uses the owning row and column context. +This is the cell that usually renders the grouped value and expansion control. ## Type Parameters @@ -42,5 +42,5 @@ This is the static implementation behind the matching cell instance API and uses ## Example ```ts -const value = cell_getIsGrouped(cell) +const isGroupedCell = cell_getIsGrouped(cell) ``` diff --git a/docs/reference/static-functions/functions/cell_getIsPlaceholder.md b/docs/reference/static-functions/functions/cell_getIsPlaceholder.md index c3db245219..1289b970a0 100644 --- a/docs/reference/static-functions/functions/cell_getIsPlaceholder.md +++ b/docs/reference/static-functions/functions/cell_getIsPlaceholder.md @@ -9,11 +9,12 @@ title: cell_getIsPlaceholder function cell_getIsPlaceholder(cell): boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:315](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L315) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:326](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L326) -Returns is placeholder for a cell. +Checks whether this cell is a placeholder hidden by grouping. -This is the static implementation behind the matching cell instance API and uses the owning row and column context. +Placeholder cells belong to grouped columns other than the row's active +grouping column. ## Type Parameters @@ -42,5 +43,5 @@ This is the static implementation behind the matching cell instance API and uses ## Example ```ts -const value = cell_getIsPlaceholder(cell) +const isPlaceholder = cell_getIsPlaceholder(cell) ``` diff --git a/docs/reference/static-functions/functions/cell_getValue.md b/docs/reference/static-functions/functions/cell_getValue.md index 015592ab65..c631c6fbef 100644 --- a/docs/reference/static-functions/functions/cell_getValue.md +++ b/docs/reference/static-functions/functions/cell_getValue.md @@ -9,11 +9,12 @@ title: cell_getValue function cell_getValue(cell): TValue; ``` -Defined in: [core/cells/coreCellsFeature.utils.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L15) +Defined in: [core/cells/coreCellsFeature.utils.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L16) -Returns value for a cell. +Reads this cell's accessor value from its owning row and column. -This is the static implementation behind the matching cell instance API and uses the owning row and column context. +This is the standalone implementation behind `cell.getValue()`, useful when +importing static APIs instead of calling methods from the cell prototype. ## Type Parameters diff --git a/docs/reference/static-functions/functions/cell_renderValue.md b/docs/reference/static-functions/functions/cell_renderValue.md index c7cba60c8d..8c3874d95e 100644 --- a/docs/reference/static-functions/functions/cell_renderValue.md +++ b/docs/reference/static-functions/functions/cell_renderValue.md @@ -9,11 +9,12 @@ title: cell_renderValue function cell_renderValue(cell): any; ``` -Defined in: [core/cells/coreCellsFeature.utils.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L33) +Defined in: [core/cells/coreCellsFeature.utils.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L35) -Returns value for a cell. +Reads the value that should be rendered for this cell. -This is the static implementation behind the matching cell instance API and uses the owning row and column context. +Nullish accessor values are replaced with `table.options.renderFallbackValue`, +matching the behavior of `cell.renderValue()`. ## Type Parameters @@ -42,5 +43,5 @@ This is the static implementation behind the matching cell instance API and uses ## Example ```ts -const value = cell_renderValue(cell) +const rendered = cell_renderValue(cell) ``` diff --git a/docs/reference/static-functions/functions/column_clearSorting.md b/docs/reference/static-functions/functions/column_clearSorting.md index 9dfc86a811..baec4b7101 100644 --- a/docs/reference/static-functions/functions/column_clearSorting.md +++ b/docs/reference/static-functions/functions/column_clearSorting.md @@ -9,11 +9,11 @@ title: column_clearSorting function column_clearSorting(column): void; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:430](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L430) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:445](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L445) -Clear Sorting. for a column. +Removes this column from the sorting state. -This is the static implementation behind the matching column instance API. +Other sorted columns are preserved, including their relative order. ## Type Parameters @@ -42,5 +42,5 @@ This is the static implementation behind the matching column instance API. ## Example ```ts -const value = column_clearSorting(column) +column_clearSorting(column) ``` diff --git a/docs/reference/static-functions/functions/column_getAfter.md b/docs/reference/static-functions/functions/column_getAfter.md index d2e58e419d..02b0af1fb6 100644 --- a/docs/reference/static-functions/functions/column_getAfter.md +++ b/docs/reference/static-functions/functions/column_getAfter.md @@ -9,11 +9,12 @@ title: column_getAfter function column_getAfter(column, position): number; ``` -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L126) +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:132](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L132) -Returns after for a column. +Computes the offset from the end edge of a pinning region after this column. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +The value is the sum of all following visible leaf column sizes in the +requested region. ## Type Parameters @@ -46,5 +47,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getAfter(column) +const rightOffset = column_getAfter(column, 'right') ``` diff --git a/docs/reference/static-functions/functions/column_getAggregationFn.md b/docs/reference/static-functions/functions/column_getAggregationFn.md index 3f10350baf..46d369df88 100644 --- a/docs/reference/static-functions/functions/column_getAggregationFn.md +++ b/docs/reference/static-functions/functions/column_getAggregationFn.md @@ -11,11 +11,13 @@ function column_getAggregationFn(column): | undefined; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:177](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L177) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:184](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L184) -Returns aggregation fn for a column. +Resolves the aggregation function configured for a column. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +Function-valued `columnDef.aggregationFn` is returned directly, `'auto'` +delegates to `column_getAutoAggregationFn`, and string values are looked up in +the table's aggregation function registry. ## Type Parameters @@ -45,5 +47,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getAggregationFn(column) +const aggregationFn = column_getAggregationFn(column) ``` diff --git a/docs/reference/static-functions/functions/column_getAutoAggregationFn.md b/docs/reference/static-functions/functions/column_getAutoAggregationFn.md index d9fc69b575..915896d878 100644 --- a/docs/reference/static-functions/functions/column_getAutoAggregationFn.md +++ b/docs/reference/static-functions/functions/column_getAutoAggregationFn.md @@ -11,11 +11,12 @@ function column_getAutoAggregationFn(column): | undefined; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:145](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L145) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:150](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L150) -Infers aggregation fn for a column. +Chooses a built-in aggregation function from the first core row value. -The inference uses the column definition, table options, and sampled row values when needed. +Numeric columns default to `sum`, date-like values default to `extent`, and +other value types leave aggregation unspecified. ## Type Parameters @@ -45,5 +46,5 @@ The inference uses the column definition, table options, and sampled row values ## Example ```ts -const value = column_getAutoAggregationFn(column) +const aggregationFn = column_getAutoAggregationFn(column) ``` diff --git a/docs/reference/static-functions/functions/column_getAutoFilterFn.md b/docs/reference/static-functions/functions/column_getAutoFilterFn.md index 6242857b75..5578e118ea 100644 --- a/docs/reference/static-functions/functions/column_getAutoFilterFn.md +++ b/docs/reference/static-functions/functions/column_getAutoFilterFn.md @@ -11,11 +11,13 @@ function column_getAutoFilterFn(column): | undefined; ``` -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L35) +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L38) -Infers filter fn for a column. +Chooses a built-in filter function from the column's first core row value. -The inference uses the column definition, table options, and sampled row values when needed. +Strings use `includesString`, numbers use `inNumberRange`, booleans and +objects use `equals`, arrays use `arrIncludes`, and unknown values fall back +to `weakEquals`. ## Type Parameters @@ -45,5 +47,5 @@ The inference uses the column definition, table options, and sampled row values ## Example ```ts -const value = column_getAutoFilterFn(column) +const filterFn = column_getAutoFilterFn(column) ``` diff --git a/docs/reference/static-functions/functions/column_getAutoSortDir.md b/docs/reference/static-functions/functions/column_getAutoSortDir.md index b670003b73..1c98798dfc 100644 --- a/docs/reference/static-functions/functions/column_getAutoSortDir.md +++ b/docs/reference/static-functions/functions/column_getAutoSortDir.md @@ -9,11 +9,12 @@ title: column_getAutoSortDir function column_getAutoSortDir(column): "asc" | "desc"; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L126) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:132](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L132) -Infers sort dir for a column. +Chooses the default first sort direction from the first filtered row value. -The inference uses the column definition, table options, and sampled row values when needed. +String columns start ascending so alphabetical order is natural; other value +types start descending. ## Type Parameters @@ -42,5 +43,5 @@ The inference uses the column definition, table options, and sampled row values ## Example ```ts -const value = column_getAutoSortDir(column) +const direction = column_getAutoSortDir(column) ``` diff --git a/docs/reference/static-functions/functions/column_getAutoSortFn.md b/docs/reference/static-functions/functions/column_getAutoSortFn.md index 42588569db..ecdf0a46df 100644 --- a/docs/reference/static-functions/functions/column_getAutoSortFn.md +++ b/docs/reference/static-functions/functions/column_getAutoSortFn.md @@ -9,11 +9,13 @@ title: column_getAutoSortFn function column_getAutoSortFn(column): SortFn; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L79) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L84) -Infers sort fn for a column. +Chooses a built-in sorting function from sampled filtered row values. -The inference uses the column definition, table options, and sampled row values when needed. +Date-like values use `datetime`, mixed text/numeric strings use +`alphanumeric`, plain strings use `text`, and unknown values fall back to +`basic`. ## Type Parameters @@ -42,5 +44,5 @@ The inference uses the column definition, table options, and sampled row values ## Example ```ts -const value = column_getAutoSortFn(column) +const sortFn = column_getAutoSortFn(column) ``` diff --git a/docs/reference/static-functions/functions/column_getCanFilter.md b/docs/reference/static-functions/functions/column_getCanFilter.md index c90c200ef2..2f116098b1 100644 --- a/docs/reference/static-functions/functions/column_getCanFilter.md +++ b/docs/reference/static-functions/functions/column_getCanFilter.md @@ -9,11 +9,12 @@ title: column_getCanFilter function column_getCanFilter(column): boolean; ``` -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L115) +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L121) -Returns whether a column can use filter. +Checks whether column filtering is enabled for this accessor column. -This combines column options, table options, and any required accessor or feature state for the capability. +The column must have an accessor and filtering must be enabled by the column +definition, `enableColumnFilters`, and the table-wide `enableFilters` option. ## Type Parameters @@ -42,5 +43,5 @@ This combines column options, table options, and any required accessor or featur ## Example ```ts -const value = column_getCanFilter(column) +const canFilter = column_getCanFilter(column) ``` diff --git a/docs/reference/static-functions/functions/column_getCanGlobalFilter.md b/docs/reference/static-functions/functions/column_getCanGlobalFilter.md index 6a3767744b..4ab8fd5752 100644 --- a/docs/reference/static-functions/functions/column_getCanGlobalFilter.md +++ b/docs/reference/static-functions/functions/column_getCanGlobalFilter.md @@ -9,11 +9,12 @@ title: column_getCanGlobalFilter function column_getCanGlobalFilter(column): boolean; ``` -Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L19) +Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L20) -Returns whether a column can use global filter. +Checks whether this accessor column participates in global filtering. -This combines column options, table options, and any required accessor or feature state for the capability. +The column must have an accessor and pass column-level, table-level, and +optional `getColumnCanGlobalFilter` checks. ## Type Parameters @@ -42,5 +43,5 @@ This combines column options, table options, and any required accessor or featur ## Example ```ts -const value = column_getCanGlobalFilter(column) +const canGlobalFilter = column_getCanGlobalFilter(column) ``` diff --git a/docs/reference/static-functions/functions/column_getCanGroup.md b/docs/reference/static-functions/functions/column_getCanGroup.md index eb3c339482..37713c248e 100644 --- a/docs/reference/static-functions/functions/column_getCanGroup.md +++ b/docs/reference/static-functions/functions/column_getCanGroup.md @@ -9,11 +9,12 @@ title: column_getCanGroup function column_getCanGroup(column): boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L64) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L67) -Returns whether a column can use group. +Checks whether this column can be used for grouping. -This combines column options, table options, and any required accessor or feature state for the capability. +Grouping must be enabled at the column and table level, and the column must +either have an accessor or provide `getGroupingValue`. ## Type Parameters @@ -42,5 +43,5 @@ This combines column options, table options, and any required accessor or featur ## Example ```ts -const value = column_getCanGroup(column) +const canGroup = column_getCanGroup(column) ``` diff --git a/docs/reference/static-functions/functions/column_getCanHide.md b/docs/reference/static-functions/functions/column_getCanHide.md index 5f64f1d51c..6ee3526e4b 100644 --- a/docs/reference/static-functions/functions/column_getCanHide.md +++ b/docs/reference/static-functions/functions/column_getCanHide.md @@ -9,11 +9,11 @@ title: column_getCanHide function column_getCanHide(column): boolean; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L85) +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L89) -Returns whether a column can use hide. +Checks whether this column is allowed to be hidden. -This combines column options, table options, and any required accessor or feature state for the capability. +Both `columnDef.enableHiding` and table `enableHiding` default to `true`. ## Type Parameters @@ -42,5 +42,5 @@ This combines column options, table options, and any required accessor or featur ## Example ```ts -const value = column_getCanHide(column) +const canHide = column_getCanHide(column) ``` diff --git a/docs/reference/static-functions/functions/column_getCanMultiSort.md b/docs/reference/static-functions/functions/column_getCanMultiSort.md index 8a0a5ba23f..d92a8ca18b 100644 --- a/docs/reference/static-functions/functions/column_getCanMultiSort.md +++ b/docs/reference/static-functions/functions/column_getCanMultiSort.md @@ -9,11 +9,12 @@ title: column_getCanMultiSort function column_getCanMultiSort(column): boolean; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:366](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L366) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:380](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L380) -Returns whether a column can use multi sort. +Checks whether this column can be added to a multi-sort state. -This combines column options, table options, and any required accessor or feature state for the capability. +Column-level `enableMultiSort` wins over table-level `enableMultiSort`; if +neither is set, accessor columns can multi-sort by default. ## Type Parameters @@ -42,5 +43,5 @@ This combines column options, table options, and any required accessor or featur ## Example ```ts -const value = column_getCanMultiSort(column) +const canMultiSort = column_getCanMultiSort(column) ``` diff --git a/docs/reference/static-functions/functions/column_getCanPin.md b/docs/reference/static-functions/functions/column_getCanPin.md index f81b8f871f..1b7832b125 100644 --- a/docs/reference/static-functions/functions/column_getCanPin.md +++ b/docs/reference/static-functions/functions/column_getCanPin.md @@ -9,11 +9,12 @@ title: column_getCanPin function column_getCanPin(column): boolean; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L99) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L108) -Returns whether a column can use pin. +Checks whether this column or any of its leaf columns can be pinned. -This combines column options, table options, and any required accessor or feature state for the capability. +Column-level `enablePinning` and table `enableColumnPinning` both default to +`true`; at least one leaf column must allow pinning. ## Type Parameters @@ -42,5 +43,5 @@ This combines column options, table options, and any required accessor or featur ## Example ```ts -const value = column_getCanPin(column) +const canPin = column_getCanPin(column) ``` diff --git a/docs/reference/static-functions/functions/column_getCanResize.md b/docs/reference/static-functions/functions/column_getCanResize.md index d995cf485f..381f3626fe 100644 --- a/docs/reference/static-functions/functions/column_getCanResize.md +++ b/docs/reference/static-functions/functions/column_getCanResize.md @@ -9,11 +9,12 @@ title: column_getCanResize function column_getCanResize(column): boolean; ``` -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L47) +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L49) -Returns whether a column can use resize. +Checks whether this column can start a resize interaction. -This combines column options, table options, and any required accessor or feature state for the capability. +Both `columnDef.enableResizing` and table `enableColumnResizing` default to +`true`. ## Type Parameters @@ -42,5 +43,5 @@ This combines column options, table options, and any required accessor or featur ## Example ```ts -const value = column_getCanResize(column) +const canResize = column_getCanResize(column) ``` diff --git a/docs/reference/static-functions/functions/column_getCanSort.md b/docs/reference/static-functions/functions/column_getCanSort.md index eea152bf0d..8f307b73f0 100644 --- a/docs/reference/static-functions/functions/column_getCanSort.md +++ b/docs/reference/static-functions/functions/column_getCanSort.md @@ -9,11 +9,12 @@ title: column_getCanSort function column_getCanSort(column): boolean; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:344](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L344) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:357](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L357) -Returns whether a column can use sort. +Checks whether this accessor column can participate in sorting. -This combines column options, table options, and any required accessor or feature state for the capability. +The column must have an accessor and sorting must be enabled by both the +column definition and table options. ## Type Parameters @@ -42,5 +43,5 @@ This combines column options, table options, and any required accessor or featur ## Example ```ts -const value = column_getCanSort(column) +const canSort = column_getCanSort(column) ``` diff --git a/docs/reference/static-functions/functions/column_getFacetedMinMaxValues.md b/docs/reference/static-functions/functions/column_getFacetedMinMaxValues.md index 75478ba868..524c41b442 100644 --- a/docs/reference/static-functions/functions/column_getFacetedMinMaxValues.md +++ b/docs/reference/static-functions/functions/column_getFacetedMinMaxValues.md @@ -9,11 +9,12 @@ title: column_getFacetedMinMaxValues function column_getFacetedMinMaxValues(column, table): [number, number] | undefined; ``` -Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L17) +Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L18) -Returns faceted min max values for a column. +Computes min and max numeric facet values for one column. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +The configured `facetedMinMaxValues` row-model factory owns the calculation. +If no factory is registered, the result is `undefined`. ## Type Parameters @@ -46,5 +47,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getFacetedMinMaxValues(column) +const range = column_getFacetedMinMaxValues(column, table) ``` diff --git a/docs/reference/static-functions/functions/column_getFacetedRowModel.md b/docs/reference/static-functions/functions/column_getFacetedRowModel.md index 9daf7126d7..8e99e9571f 100644 --- a/docs/reference/static-functions/functions/column_getFacetedRowModel.md +++ b/docs/reference/static-functions/functions/column_getFacetedRowModel.md @@ -9,11 +9,13 @@ title: column_getFacetedRowModel function column_getFacetedRowModel(column, table): RowModel; ``` -Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L41) +Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L44) -Returns faceted row model for a column. +Computes the row model used to derive one column's facet values. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +The faceted row model normally applies every other active filter while +excluding this column's own filter. If no factory is registered, the +pre-filtered row model is returned. ## Type Parameters @@ -46,5 +48,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getFacetedRowModel(column) +const rows = column_getFacetedRowModel(column, table) ``` diff --git a/docs/reference/static-functions/functions/column_getFacetedUniqueValues.md b/docs/reference/static-functions/functions/column_getFacetedUniqueValues.md index a22728abca..71b241e1ec 100644 --- a/docs/reference/static-functions/functions/column_getFacetedUniqueValues.md +++ b/docs/reference/static-functions/functions/column_getFacetedUniqueValues.md @@ -9,11 +9,12 @@ title: column_getFacetedUniqueValues function column_getFacetedUniqueValues(column, table): Map; ``` -Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L65) +Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L69) -Returns faceted unique values for a column. +Computes unique facet values and their occurrence counts for one column. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +The configured `facetedUniqueValues` row-model factory owns the calculation. +If no factory is registered, an empty `Map` is returned. ## Type Parameters @@ -46,5 +47,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getFacetedUniqueValues(column) +const values = column_getFacetedUniqueValues(column, table) ``` diff --git a/docs/reference/static-functions/functions/column_getFilterFn.md b/docs/reference/static-functions/functions/column_getFilterFn.md index dbef9bdcbc..c50658179e 100644 --- a/docs/reference/static-functions/functions/column_getFilterFn.md +++ b/docs/reference/static-functions/functions/column_getFilterFn.md @@ -11,11 +11,13 @@ function column_getFilterFn(column): | undefined; ``` -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L80) +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L85) -Returns filter fn for a column. +Resolves the filter function configured for a column. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +Function-valued `columnDef.filterFn` is returned directly, `'auto'` delegates +to `column_getAutoFilterFn`, and string values are looked up in the table's +filter function registry. ## Type Parameters @@ -45,5 +47,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getFilterFn(column) +const filterFn = column_getFilterFn(column) ``` diff --git a/docs/reference/static-functions/functions/column_getFilterIndex.md b/docs/reference/static-functions/functions/column_getFilterIndex.md index 030c2bb3dd..32f453688a 100644 --- a/docs/reference/static-functions/functions/column_getFilterIndex.md +++ b/docs/reference/static-functions/functions/column_getFilterIndex.md @@ -9,11 +9,11 @@ title: column_getFilterIndex function column_getFilterIndex(column): number; ``` -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:176](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L176) +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:183](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L183) -Returns filter index for a column. +Finds this column's position in the ordered `state.columnFilters` array. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +The result is `-1` when the column has no active filter. ## Type Parameters @@ -42,5 +42,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getFilterIndex(column) +const index = column_getFilterIndex(column) ``` diff --git a/docs/reference/static-functions/functions/column_getFilterValue.md b/docs/reference/static-functions/functions/column_getFilterValue.md index ca5b0709d6..b75d6499ba 100644 --- a/docs/reference/static-functions/functions/column_getFilterValue.md +++ b/docs/reference/static-functions/functions/column_getFilterValue.md @@ -9,11 +9,11 @@ title: column_getFilterValue function column_getFilterValue(column): unknown; ``` -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L156) +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L163) -Returns filter value for a column. +Reads this column's current filter value from `state.columnFilters`. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +Missing filter entries return `undefined`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/column_getFirstSortDir.md b/docs/reference/static-functions/functions/column_getFirstSortDir.md index e7b0e54b41..7c67ffb995 100644 --- a/docs/reference/static-functions/functions/column_getFirstSortDir.md +++ b/docs/reference/static-functions/functions/column_getFirstSortDir.md @@ -9,11 +9,12 @@ title: column_getFirstSortDir function column_getFirstSortDir(column): "asc" | "desc"; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:290](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L290) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:301](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L301) -Returns first sort dir for a column. +Resolves the first direction used when this column begins sorting. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +Column-level `sortDescFirst` wins, then table-level `sortDescFirst`, then the +auto direction inferred from sampled values. ## Type Parameters @@ -42,5 +43,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getFirstSortDir(column) +const firstDirection = column_getFirstSortDir(column) ``` diff --git a/docs/reference/static-functions/functions/column_getFlatColumns.md b/docs/reference/static-functions/functions/column_getFlatColumns.md index 0227c82195..a496cedef6 100644 --- a/docs/reference/static-functions/functions/column_getFlatColumns.md +++ b/docs/reference/static-functions/functions/column_getFlatColumns.md @@ -9,11 +9,12 @@ title: column_getFlatColumns function column_getFlatColumns(column): Column[]; ``` -Defined in: [core/columns/coreColumnsFeature.utils.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L24) +Defined in: [core/columns/coreColumnsFeature.utils.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L25) -Returns flat columns for a column. +Flattens this column and every descendant column into a single array. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +Group columns appear before their child columns, which matches the normalized +column hierarchy produced during table construction. ## Type Parameters @@ -42,5 +43,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getFlatColumns(column) +const flatColumns = column_getFlatColumns(column) ``` diff --git a/docs/reference/static-functions/functions/column_getGroupedIndex.md b/docs/reference/static-functions/functions/column_getGroupedIndex.md index 0de672dcf4..cd7e92eec4 100644 --- a/docs/reference/static-functions/functions/column_getGroupedIndex.md +++ b/docs/reference/static-functions/functions/column_getGroupedIndex.md @@ -9,11 +9,11 @@ title: column_getGroupedIndex function column_getGroupedIndex(column): number; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L104) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L108) -Returns grouped index for a column. +Finds this column's position in the ordered grouping state. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +The result is `-1` when the column is not grouped. ## Type Parameters @@ -42,5 +42,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getGroupedIndex(column) +const index = column_getGroupedIndex(column) ``` diff --git a/docs/reference/static-functions/functions/column_getIndex.md b/docs/reference/static-functions/functions/column_getIndex.md index 33c4fdaa2f..9f3ec29672 100644 --- a/docs/reference/static-functions/functions/column_getIndex.md +++ b/docs/reference/static-functions/functions/column_getIndex.md @@ -9,11 +9,12 @@ title: column_getIndex function column_getIndex(column, position?): number; ``` -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L35) +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L37) -Returns index for a column. +Finds this column's index within a visible pinning region. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +Pass `'left'`, `'center'`, or `'right'` to search that region; omit the +position to search the full visible leaf column list. ## Type Parameters @@ -46,5 +47,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getIndex(column) +const index = column_getIndex(column, 'center') ``` diff --git a/docs/reference/static-functions/functions/column_getIsFiltered.md b/docs/reference/static-functions/functions/column_getIsFiltered.md index a877598be9..227b84654d 100644 --- a/docs/reference/static-functions/functions/column_getIsFiltered.md +++ b/docs/reference/static-functions/functions/column_getIsFiltered.md @@ -9,11 +9,12 @@ title: column_getIsFiltered function column_getIsFiltered(column): boolean; ``` -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:138](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L138) +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:145](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L145) -Returns is filtered for a column. +Checks whether this column currently has an entry in `state.columnFilters`. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +This only reflects filter state presence; it does not indicate whether the +filter removes any rows. ## Type Parameters @@ -42,5 +43,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getIsFiltered(column) +const isFiltered = column_getIsFiltered(column) ``` diff --git a/docs/reference/static-functions/functions/column_getIsFirstColumn.md b/docs/reference/static-functions/functions/column_getIsFirstColumn.md index 34d57c155b..0626e52bb1 100644 --- a/docs/reference/static-functions/functions/column_getIsFirstColumn.md +++ b/docs/reference/static-functions/functions/column_getIsFirstColumn.md @@ -9,11 +9,11 @@ title: column_getIsFirstColumn function column_getIsFirstColumn(column, position?): boolean; ``` -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L57) +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L59) -Returns is first column for a column. +Checks whether this column is the first visible column in a pinning region. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +The same `position` semantics as `column_getIndex` apply. ## Type Parameters @@ -46,5 +46,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getIsFirstColumn(column) +const isFirst = column_getIsFirstColumn(column, 'left') ``` diff --git a/docs/reference/static-functions/functions/column_getIsGrouped.md b/docs/reference/static-functions/functions/column_getIsGrouped.md index 5198dcd637..7d8ebf4a56 100644 --- a/docs/reference/static-functions/functions/column_getIsGrouped.md +++ b/docs/reference/static-functions/functions/column_getIsGrouped.md @@ -9,11 +9,12 @@ title: column_getIsGrouped function column_getIsGrouped(column): boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L86) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L90) -Returns is grouped for a column. +Checks whether this column id is present in `state.grouping`. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +The result only reflects grouping state, not whether the grouped row model has +been calculated yet. ## Type Parameters @@ -42,5 +43,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getIsGrouped(column) +const isGrouped = column_getIsGrouped(column) ``` diff --git a/docs/reference/static-functions/functions/column_getIsLastColumn.md b/docs/reference/static-functions/functions/column_getIsLastColumn.md index 7c19873d9f..db9831011a 100644 --- a/docs/reference/static-functions/functions/column_getIsLastColumn.md +++ b/docs/reference/static-functions/functions/column_getIsLastColumn.md @@ -9,11 +9,11 @@ title: column_getIsLastColumn function column_getIsLastColumn(column, position?): boolean; ``` -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L79) +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L81) -Returns is last column for a column. +Checks whether this column is the last visible column in a pinning region. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +The same `position` semantics as `column_getIndex` apply. ## Type Parameters @@ -46,5 +46,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getIsLastColumn(column) +const isLast = column_getIsLastColumn(column, 'right') ``` diff --git a/docs/reference/static-functions/functions/column_getIsPinned.md b/docs/reference/static-functions/functions/column_getIsPinned.md index 3d2a42aa21..f2a6f58289 100644 --- a/docs/reference/static-functions/functions/column_getIsPinned.md +++ b/docs/reference/static-functions/functions/column_getIsPinned.md @@ -9,11 +9,12 @@ title: column_getIsPinned function column_getIsPinned(column): ColumnPinningPosition; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:125](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L125) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:135](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L135) -Returns is pinned for a column. +Reads this column's current pinning region. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +Group columns report `'left'` or `'right'` when any leaf column is pinned in +that region. Unpinned columns return `false`. ## Type Parameters @@ -42,5 +43,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getIsPinned(column) +const position = column_getIsPinned(column) ``` diff --git a/docs/reference/static-functions/functions/column_getIsResizing.md b/docs/reference/static-functions/functions/column_getIsResizing.md index 6eee398d5f..d81389bfa3 100644 --- a/docs/reference/static-functions/functions/column_getIsResizing.md +++ b/docs/reference/static-functions/functions/column_getIsResizing.md @@ -9,11 +9,11 @@ title: column_getIsResizing function column_getIsResizing(column): boolean; ``` -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L68) +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:70](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L70) -Returns is resizing for a column. +Checks whether this column is the active column resize target. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +The value is read from `state.columnResizing.isResizingColumn`. ## Type Parameters @@ -42,5 +42,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getIsResizing(column) +const isResizing = column_getIsResizing(column) ``` diff --git a/docs/reference/static-functions/functions/column_getIsSorted.md b/docs/reference/static-functions/functions/column_getIsSorted.md index fb8dfcd7c2..d49e43e42b 100644 --- a/docs/reference/static-functions/functions/column_getIsSorted.md +++ b/docs/reference/static-functions/functions/column_getIsSorted.md @@ -9,11 +9,12 @@ title: column_getIsSorted function column_getIsSorted(column): false | SortDirection; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:388](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L388) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:403](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L403) Returns is sorted for a column. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +The result is `false` when the column is not sorted, otherwise `'asc'` or +`'desc'` based on the column's entry in `state.sorting`. ## Type Parameters @@ -42,5 +43,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getIsSorted(column) +const direction = column_getIsSorted(column) ``` diff --git a/docs/reference/static-functions/functions/column_getIsVisible.md b/docs/reference/static-functions/functions/column_getIsVisible.md index 12d6321e4b..48df5a5702 100644 --- a/docs/reference/static-functions/functions/column_getIsVisible.md +++ b/docs/reference/static-functions/functions/column_getIsVisible.md @@ -9,11 +9,13 @@ title: column_getIsVisible function column_getIsVisible(column): boolean; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L60) +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L64) -Returns is visible for a column. +Checks whether this column is visible. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +Leaf columns read `state.columnVisibility[column.id]`, where missing entries +default to visible. Parent columns are visible when at least one child column +is visible. ## Type Parameters @@ -42,5 +44,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getIsVisible(column) +const visible = column_getIsVisible(column) ``` diff --git a/docs/reference/static-functions/functions/column_getLeafColumns.md b/docs/reference/static-functions/functions/column_getLeafColumns.md index 8ccc0aa63e..6a4a3a5ca9 100644 --- a/docs/reference/static-functions/functions/column_getLeafColumns.md +++ b/docs/reference/static-functions/functions/column_getLeafColumns.md @@ -9,11 +9,12 @@ title: column_getLeafColumns function column_getLeafColumns(column): Column[]; ``` -Defined in: [core/columns/coreColumnsFeature.utils.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L44) +Defined in: [core/columns/coreColumnsFeature.utils.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L46) -Returns leaf columns for a column. +Collects the terminal leaf columns below this column. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +Group columns return their ordered descendants. Non-group columns return an +array containing only the column itself. ## Type Parameters @@ -42,5 +43,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getLeafColumns(column) +const leafColumns = column_getLeafColumns(column) ``` diff --git a/docs/reference/static-functions/functions/column_getNextSortingOrder.md b/docs/reference/static-functions/functions/column_getNextSortingOrder.md index 916a878dc8..a4ef43cd95 100644 --- a/docs/reference/static-functions/functions/column_getNextSortingOrder.md +++ b/docs/reference/static-functions/functions/column_getNextSortingOrder.md @@ -9,11 +9,12 @@ title: column_getNextSortingOrder function column_getNextSortingOrder(column, multi?): false | "asc" | "desc"; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:312](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L312) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:324](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L324) -Returns next sorting order for a column. +Resolves the next sort order for this column's toggle cycle. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +The cycle starts with the first sort direction, flips between `asc` and +`desc`, and can return `false` when sorting removal is enabled. ## Type Parameters @@ -46,5 +47,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getNextSortingOrder(column) +const nextOrder = column_getNextSortingOrder(column) ``` diff --git a/docs/reference/static-functions/functions/column_getPinnedIndex.md b/docs/reference/static-functions/functions/column_getPinnedIndex.md index dd68a88bc5..edd7993104 100644 --- a/docs/reference/static-functions/functions/column_getPinnedIndex.md +++ b/docs/reference/static-functions/functions/column_getPinnedIndex.md @@ -9,11 +9,12 @@ title: column_getPinnedIndex function column_getPinnedIndex(column): number; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:153](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L153) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:164](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L164) -Returns pinned index for a column. +Finds this column's index within its pinned region. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +Unpinned columns return `0`; pinned columns return their position in +`state.columnPinning.left` or `state.columnPinning.right`. ## Type Parameters @@ -42,5 +43,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getPinnedIndex(column) +const index = column_getPinnedIndex(column) ``` diff --git a/docs/reference/static-functions/functions/column_getSize.md b/docs/reference/static-functions/functions/column_getSize.md index 9af723efbf..a83a6e7c47 100644 --- a/docs/reference/static-functions/functions/column_getSize.md +++ b/docs/reference/static-functions/functions/column_getSize.md @@ -9,11 +9,12 @@ title: column_getSize function column_getSize(column): number; ``` -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L59) +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L63) -Returns size for a column. +Resolves a column's current pixel size. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +Committed `state.columnSizing[column.id]` wins over `columnDef.size`, then the +built-in default size. The result is clamped between min and max size. ## Type Parameters @@ -42,5 +43,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getSize(column) +const width = column_getSize(column) ``` diff --git a/docs/reference/static-functions/functions/column_getSortFn.md b/docs/reference/static-functions/functions/column_getSortFn.md index 274512d633..5bdac6f1f3 100644 --- a/docs/reference/static-functions/functions/column_getSortFn.md +++ b/docs/reference/static-functions/functions/column_getSortFn.md @@ -9,11 +9,13 @@ title: column_getSortFn function column_getSortFn(column): SortFn; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:152](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L152) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:160](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L160) -Returns sort fn for a column. +Resolves the sorting function configured for a column. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +Function-valued `columnDef.sortFn` is returned directly, `'auto'` delegates +to `column_getAutoSortFn`, and string values are looked up in the table's +sorting function registry before falling back to `basic`. ## Type Parameters @@ -42,5 +44,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getSortFn(column) +const sortFn = column_getSortFn(column) ``` diff --git a/docs/reference/static-functions/functions/column_getSortIndex.md b/docs/reference/static-functions/functions/column_getSortIndex.md index 2d7538763e..f14205c323 100644 --- a/docs/reference/static-functions/functions/column_getSortIndex.md +++ b/docs/reference/static-functions/functions/column_getSortIndex.md @@ -9,11 +9,11 @@ title: column_getSortIndex function column_getSortIndex(column): number; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:409](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L409) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:424](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L424) -Returns sort index for a column. +Finds this column's position in the ordered `state.sorting` array. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +The result is `-1` when the column is not sorted. ## Type Parameters @@ -42,5 +42,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getSortIndex(column) +const index = column_getSortIndex(column) ``` diff --git a/docs/reference/static-functions/functions/column_getStart.md b/docs/reference/static-functions/functions/column_getStart.md index 54a83ed99d..2c14383926 100644 --- a/docs/reference/static-functions/functions/column_getStart.md +++ b/docs/reference/static-functions/functions/column_getStart.md @@ -9,11 +9,12 @@ title: column_getStart function column_getStart(column, position): number; ``` -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L86) +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L91) -Returns start for a column. +Computes the offset from the start edge of a pinning region to this column. -This derives the value from the column definition, table options, and the feature state atoms registered on the table. +The value is the sum of all previous visible leaf column sizes in the +requested `'left'`, `'center'`, or `'right'` region. ## Type Parameters @@ -46,5 +47,5 @@ This derives the value from the column definition, table options, and the featur ## Example ```ts -const value = column_getStart(column) +const leftOffset = column_getStart(column, 'left') ``` diff --git a/docs/reference/static-functions/functions/column_getToggleGroupingHandler.md b/docs/reference/static-functions/functions/column_getToggleGroupingHandler.md index 39cb88d907..80f29a6aac 100644 --- a/docs/reference/static-functions/functions/column_getToggleGroupingHandler.md +++ b/docs/reference/static-functions/functions/column_getToggleGroupingHandler.md @@ -9,11 +9,11 @@ title: column_getToggleGroupingHandler function column_getToggleGroupingHandler(column): () => void; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L122) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L126) -Returns an event handler for toggling grouping handler. +Creates a header/control handler that toggles grouping for this column. -The handler is intended for direct use in column header controls such as buttons or checkboxes. +The handler is a no-op when `column_getCanGroup(column)` is false. ## Type Parameters @@ -48,5 +48,5 @@ The handler is intended for direct use in column header controls such as buttons ## Example ```ts -const value = column_getToggleGroupingHandler(column) +const onClick = column_getToggleGroupingHandler(column) ``` diff --git a/docs/reference/static-functions/functions/column_getToggleSortingHandler.md b/docs/reference/static-functions/functions/column_getToggleSortingHandler.md index fa05453a92..d4213272a9 100644 --- a/docs/reference/static-functions/functions/column_getToggleSortingHandler.md +++ b/docs/reference/static-functions/functions/column_getToggleSortingHandler.md @@ -9,11 +9,13 @@ title: column_getToggleSortingHandler function column_getToggleSortingHandler(column): (e) => void; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:451](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L451) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:468](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L468) -Returns an event handler for toggling sorting handler. +Creates a header event handler that toggles this column's sorting. -The handler is intended for direct use in column header controls such as buttons or checkboxes. +The handler ignores events when the column cannot sort, persists React-style +synthetic events when present, and asks `options.isMultiSortEvent` whether +the event should add to a multi-sort. ## Type Parameters @@ -54,5 +56,5 @@ The handler is intended for direct use in column header controls such as buttons ## Example ```ts -const value = column_getToggleSortingHandler(column) +const onClick = column_getToggleSortingHandler(column) ``` diff --git a/docs/reference/static-functions/functions/column_getToggleVisibilityHandler.md b/docs/reference/static-functions/functions/column_getToggleVisibilityHandler.md index e45b48e211..c285d3a85d 100644 --- a/docs/reference/static-functions/functions/column_getToggleVisibilityHandler.md +++ b/docs/reference/static-functions/functions/column_getToggleVisibilityHandler.md @@ -9,11 +9,12 @@ title: column_getToggleVisibilityHandler function column_getToggleVisibilityHandler(column): (e) => void; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L106) +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:111](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L111) -Returns an event handler for toggling visibility handler. +Creates a checkbox-style handler that writes this column's visibility. -The handler is intended for direct use in column header controls such as buttons or checkboxes. +The handler reads `event.target.checked`, so it is intended for visibility +controls whose checked state means "visible". ## Type Parameters @@ -54,5 +55,5 @@ The handler is intended for direct use in column header controls such as buttons ## Example ```ts -const value = column_getToggleVisibilityHandler(column) +const onChange = column_getToggleVisibilityHandler(column) ``` diff --git a/docs/reference/static-functions/functions/column_pin.md b/docs/reference/static-functions/functions/column_pin.md index c731ae73e1..f661652511 100644 --- a/docs/reference/static-functions/functions/column_pin.md +++ b/docs/reference/static-functions/functions/column_pin.md @@ -9,11 +9,13 @@ title: column_pin function column_pin(column, position): void; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L51) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L56) -Pin. for a column. +Moves this column's leaf column ids into a pinning region. -This is the static implementation behind the matching column instance API. +Pinning a group column pins all of its leaves. The leaf ids are first removed +from both regions, then appended to the requested `'left'` or `'right'` +region. Passing `false` unpins them back to the center. ## Type Parameters diff --git a/docs/reference/static-functions/functions/column_resetSize.md b/docs/reference/static-functions/functions/column_resetSize.md index 29b9ad05aa..3fc6a129de 100644 --- a/docs/reference/static-functions/functions/column_resetSize.md +++ b/docs/reference/static-functions/functions/column_resetSize.md @@ -9,11 +9,12 @@ title: column_resetSize function column_resetSize(column): void; ``` -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:165](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L165) +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:172](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L172) -Reset Size. for a column. +Removes this column's committed size override. -This is the static implementation behind the matching column instance API. +After reset, the column resolves size from `columnDef.size` or built-in +defaults again. ## Type Parameters @@ -42,5 +43,5 @@ This is the static implementation behind the matching column instance API. ## Example ```ts -const value = column_resetSize(column) +column_resetSize(column) ``` diff --git a/docs/reference/static-functions/functions/column_setFilterValue.md b/docs/reference/static-functions/functions/column_setFilterValue.md index 11523d23bf..5e3c8bc431 100644 --- a/docs/reference/static-functions/functions/column_setFilterValue.md +++ b/docs/reference/static-functions/functions/column_setFilterValue.md @@ -9,11 +9,12 @@ title: column_setFilterValue function column_setFilterValue(column, value): void; ``` -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:198](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L198) +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:206](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L206) -Updates filter value for a column. +Adds, updates, or removes this column's filter value. -This delegates to the owning table state updater so external state, external atoms, and internal state stay synchronized. +The incoming value may be an updater. After resolution, `autoRemove` rules +decide whether the filter should be removed instead of stored. ## Type Parameters @@ -46,5 +47,5 @@ This delegates to the owning table state updater so external state, external ato ## Example ```ts -column_setFilterValue(column, (old) => old) +column_setFilterValue(column, (old) => String(old ?? '').trim()) ``` diff --git a/docs/reference/static-functions/functions/column_toggleGrouping.md b/docs/reference/static-functions/functions/column_toggleGrouping.md index 066bd9ca81..40f0070799 100644 --- a/docs/reference/static-functions/functions/column_toggleGrouping.md +++ b/docs/reference/static-functions/functions/column_toggleGrouping.md @@ -9,11 +9,12 @@ title: column_toggleGrouping function column_toggleGrouping(column): void; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L39) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L41) -Toggles grouping for a column. +Adds or removes this column id from the grouping state. -The update is applied through the owning table state slice and respects the feature options for that column. +Existing grouped columns keep their order. A column already present in +`state.grouping` is removed; otherwise it is appended. ## Type Parameters diff --git a/docs/reference/static-functions/functions/column_toggleSorting.md b/docs/reference/static-functions/functions/column_toggleSorting.md index c8a1cfb7b9..6d0103f655 100644 --- a/docs/reference/static-functions/functions/column_toggleSorting.md +++ b/docs/reference/static-functions/functions/column_toggleSorting.md @@ -12,11 +12,13 @@ function column_toggleSorting( multi?): void; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:177](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L177) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:187](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L187) -Toggles sorting for a column. +Applies the next sorting state for this column. -The update is applied through the owning table state slice and respects the feature options for that column. +The toggle can add, replace, flip, or remove this column's sort entry. Multi +sorting respects `enableMultiSort`, `maxMultiSortColCount`, and the `multi` +argument. ## Type Parameters @@ -53,5 +55,5 @@ The update is applied through the owning table state slice and respects the feat ## Example ```ts -column_toggleSorting(column) +column_toggleSorting(column, undefined, true) ``` diff --git a/docs/reference/static-functions/functions/column_toggleVisibility.md b/docs/reference/static-functions/functions/column_toggleVisibility.md index fe5d4cf31e..048d691d61 100644 --- a/docs/reference/static-functions/functions/column_toggleVisibility.md +++ b/docs/reference/static-functions/functions/column_toggleVisibility.md @@ -9,11 +9,12 @@ title: column_toggleVisibility function column_toggleVisibility(column, visible?): void; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L35) +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L37) -Toggles visibility for a column. +Updates this column's visibility when hiding is allowed. -The update is applied through the owning table state slice and respects the feature options for that column. +Passing `visible` stores that value. Omitting it flips the column's current +visibility state. Columns that cannot hide are left unchanged. ## Type Parameters diff --git a/docs/reference/static-functions/functions/getDefaultColumnFiltersState.md b/docs/reference/static-functions/functions/getDefaultColumnFiltersState.md index cebd7afcbc..ecceb38179 100644 --- a/docs/reference/static-functions/functions/getDefaultColumnFiltersState.md +++ b/docs/reference/static-functions/functions/getDefaultColumnFiltersState.md @@ -9,11 +9,12 @@ title: getDefaultColumnFiltersState function getDefaultColumnFiltersState(): ColumnFiltersState; ``` -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L21) +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L22) -Returns the default column filters state. +Creates the default column filter state. -Feature constructors use this value to initialize the table state or option defaults when no user value is provided. +The feature default is an empty array, meaning no column filters are active. +Reset APIs use this value when `defaultState` is `true`. ## Returns @@ -22,5 +23,5 @@ Feature constructors use this value to initialize the table state or option defa ## Example ```ts -const initialValue = getDefaultColumnFiltersState() +const filters = getDefaultColumnFiltersState() ``` diff --git a/docs/reference/static-functions/functions/getDefaultColumnOrderState.md b/docs/reference/static-functions/functions/getDefaultColumnOrderState.md index 75d0ed4c27..f0bb7df650 100644 --- a/docs/reference/static-functions/functions/getDefaultColumnOrderState.md +++ b/docs/reference/static-functions/functions/getDefaultColumnOrderState.md @@ -9,11 +9,12 @@ title: getDefaultColumnOrderState function getDefaultColumnOrderState(): ColumnOrderState; ``` -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L21) +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L22) -Returns the default column order state. +Creates the default column order state. -Feature constructors use this value to initialize the table state or option defaults when no user value is provided. +The feature default is an empty array, meaning leaf columns keep their natural +definition order. Reset APIs use this value when `defaultState` is `true`. ## Returns @@ -22,5 +23,5 @@ Feature constructors use this value to initialize the table state or option defa ## Example ```ts -const initialValue = getDefaultColumnOrderState() +const order = getDefaultColumnOrderState() ``` diff --git a/docs/reference/static-functions/functions/getDefaultColumnPinningState.md b/docs/reference/static-functions/functions/getDefaultColumnPinningState.md index ffbcc8ebe9..b3f3266413 100644 --- a/docs/reference/static-functions/functions/getDefaultColumnPinningState.md +++ b/docs/reference/static-functions/functions/getDefaultColumnPinningState.md @@ -9,11 +9,12 @@ title: getDefaultColumnPinningState function getDefaultColumnPinningState(): ColumnPinningState; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L32) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L35) -Returns the default column pinning state. +Creates the default column pinning state. -Feature constructors use this value to initialize the table state or option defaults when no user value is provided. +Both pinning regions start empty. Reset APIs use this value when +`defaultState` is `true`. ## Returns @@ -22,5 +23,5 @@ Feature constructors use this value to initialize the table state or option defa ## Example ```ts -const initialValue = getDefaultColumnPinningState() +const pinning = getDefaultColumnPinningState() ``` diff --git a/docs/reference/static-functions/functions/getDefaultColumnResizingState.md b/docs/reference/static-functions/functions/getDefaultColumnResizingState.md index 43eba02e9e..d4ad695e73 100644 --- a/docs/reference/static-functions/functions/getDefaultColumnResizingState.md +++ b/docs/reference/static-functions/functions/getDefaultColumnResizingState.md @@ -9,11 +9,12 @@ title: getDefaultColumnResizingState function getDefaultColumnResizingState(): columnResizingState; ``` -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L26) +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L27) -Returns the default column resizing state. +Creates the default transient column resizing state. -Feature constructors use this value to initialize the table state or option defaults when no user value is provided. +The feature default represents no active drag interaction. Reset APIs use +this value when `defaultState` is `true`. ## Returns @@ -22,5 +23,5 @@ Feature constructors use this value to initialize the table state or option defa ## Example ```ts -const initialValue = getDefaultColumnResizingState() +const resizeInfo = getDefaultColumnResizingState() ``` diff --git a/docs/reference/static-functions/functions/getDefaultColumnSizingColumnDef.md b/docs/reference/static-functions/functions/getDefaultColumnSizingColumnDef.md index 40989e6659..eafcfdf789 100644 --- a/docs/reference/static-functions/functions/getDefaultColumnSizingColumnDef.md +++ b/docs/reference/static-functions/functions/getDefaultColumnSizingColumnDef.md @@ -9,11 +9,13 @@ title: getDefaultColumnSizingColumnDef function getDefaultColumnSizingColumnDef(): object; ``` -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L41) +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L44) -Returns the default column sizing column def. +Creates the built-in sizing defaults for column definitions. -Feature constructors use this value to initialize the table state or option defaults when no user value is provided. +Columns default to `size: 150`, `minSize: 20`, and +`maxSize: Number.MAX_SAFE_INTEGER` unless overridden by column definitions or +table defaults. ## Returns @@ -40,5 +42,5 @@ size: number = 150; ## Example ```ts -const initialValue = getDefaultColumnSizingColumnDef() +const defaults = getDefaultColumnSizingColumnDef() ``` diff --git a/docs/reference/static-functions/functions/getDefaultColumnSizingState.md b/docs/reference/static-functions/functions/getDefaultColumnSizingState.md index a908364fc2..83f561c6ef 100644 --- a/docs/reference/static-functions/functions/getDefaultColumnSizingState.md +++ b/docs/reference/static-functions/functions/getDefaultColumnSizingState.md @@ -9,11 +9,12 @@ title: getDefaultColumnSizingState function getDefaultColumnSizingState(): ColumnSizingState; ``` -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L27) +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L28) -Returns the default column sizing state. +Creates the default committed column sizing state. -Feature constructors use this value to initialize the table state or option defaults when no user value is provided. +The feature default is an empty map, so columns fall back to their column def +size or the built-in sizing defaults. ## Returns @@ -22,5 +23,5 @@ Feature constructors use this value to initialize the table state or option defa ## Example ```ts -const initialValue = getDefaultColumnSizingState() +const sizing = getDefaultColumnSizingState() ``` diff --git a/docs/reference/static-functions/functions/getDefaultColumnVisibilityState.md b/docs/reference/static-functions/functions/getDefaultColumnVisibilityState.md index 35cfbea397..b0469f2cd8 100644 --- a/docs/reference/static-functions/functions/getDefaultColumnVisibilityState.md +++ b/docs/reference/static-functions/functions/getDefaultColumnVisibilityState.md @@ -9,11 +9,12 @@ title: getDefaultColumnVisibilityState function getDefaultColumnVisibilityState(): ColumnVisibilityState; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L21) +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L22) -Returns the default column visibility state. +Creates the default column visibility state. -Feature constructors use this value to initialize the table state or option defaults when no user value is provided. +The feature default is an empty object, where missing column ids are treated +as visible. Reset APIs use this value when `defaultState` is `true`. ## Returns @@ -22,5 +23,5 @@ Feature constructors use this value to initialize the table state or option defa ## Example ```ts -const initialValue = getDefaultColumnVisibilityState() +const visibility = getDefaultColumnVisibilityState() ``` diff --git a/docs/reference/static-functions/functions/getDefaultGroupingState.md b/docs/reference/static-functions/functions/getDefaultGroupingState.md index 3656efe010..cade3316fa 100644 --- a/docs/reference/static-functions/functions/getDefaultGroupingState.md +++ b/docs/reference/static-functions/functions/getDefaultGroupingState.md @@ -9,11 +9,12 @@ title: getDefaultGroupingState function getDefaultGroupingState(): GroupingState; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L25) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L26) -Returns the default grouping state. +Creates the default grouping state. -Feature constructors use this value to initialize the table state or option defaults when no user value is provided. +The feature default is an empty array, meaning no columns are grouped. Reset +APIs use this value when `defaultState` is `true`. ## Returns @@ -22,5 +23,5 @@ Feature constructors use this value to initialize the table state or option defa ## Example ```ts -const initialValue = getDefaultGroupingState() +const grouping = getDefaultGroupingState() ``` diff --git a/docs/reference/static-functions/functions/getDefaultPaginationState.md b/docs/reference/static-functions/functions/getDefaultPaginationState.md index 684911b720..d2444c1b43 100644 --- a/docs/reference/static-functions/functions/getDefaultPaginationState.md +++ b/docs/reference/static-functions/functions/getDefaultPaginationState.md @@ -9,11 +9,12 @@ title: getDefaultPaginationState function getDefaultPaginationState(): PaginationState; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L20) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L21) -Returns the default pagination state. +Creates the default pagination state used by the pagination feature. -Feature constructors use this value to initialize the table state or option defaults when no user value is provided. +The feature default starts at the first page with a page size of 10. Reset +APIs use this value when `defaultState` is `true`. ## Returns @@ -22,5 +23,5 @@ Feature constructors use this value to initialize the table state or option defa ## Example ```ts -const initialValue = getDefaultPaginationState() +const pagination = getDefaultPaginationState() ``` diff --git a/docs/reference/static-functions/functions/getDefaultSortingState.md b/docs/reference/static-functions/functions/getDefaultSortingState.md index b01ac7c0b3..e7366b3e1a 100644 --- a/docs/reference/static-functions/functions/getDefaultSortingState.md +++ b/docs/reference/static-functions/functions/getDefaultSortingState.md @@ -9,11 +9,12 @@ title: getDefaultSortingState function getDefaultSortingState(): SortingState; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L25) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L26) -Returns the default sorting state. +Creates the default sorting state. -Feature constructors use this value to initialize the table state or option defaults when no user value is provided. +The feature default is an empty array, meaning no columns are sorted. Reset +APIs use this value when `defaultState` is `true`. ## Returns @@ -22,5 +23,5 @@ Feature constructors use this value to initialize the table state or option defa ## Example ```ts -const initialValue = getDefaultSortingState() +const sorting = getDefaultSortingState() ``` diff --git a/docs/reference/static-functions/functions/header_getContext.md b/docs/reference/static-functions/functions/header_getContext.md index a5e069f92b..fab7d8ad24 100644 --- a/docs/reference/static-functions/functions/header_getContext.md +++ b/docs/reference/static-functions/functions/header_getContext.md @@ -9,11 +9,11 @@ title: header_getContext function header_getContext(header): object; ``` -Defined in: [core/headers/coreHeadersFeature.utils.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L59) +Defined in: [core/headers/coreHeadersFeature.utils.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L55) -Returns context for a header. +Builds the render context passed to a column's `header` or `footer` template. -This is the static implementation behind the matching header instance API and can account for nested header groups. +The context contains the header, its column, and the owning table instance. ## Type Parameters @@ -60,5 +60,5 @@ table: Table_Internal = header.column.table; ## Example ```ts -const value = header_getContext(header) +const context = header_getContext(header) ``` diff --git a/docs/reference/static-functions/functions/header_getLeafHeaders.md b/docs/reference/static-functions/functions/header_getLeafHeaders.md index 897415ec2f..6772e20ed6 100644 --- a/docs/reference/static-functions/functions/header_getLeafHeaders.md +++ b/docs/reference/static-functions/functions/header_getLeafHeaders.md @@ -9,11 +9,12 @@ title: header_getLeafHeaders function header_getLeafHeaders(header): Header[]; ``` -Defined in: [core/headers/coreHeadersFeature.utils.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L30) +Defined in: [core/headers/coreHeadersFeature.utils.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L26) -Returns leaf headers for a header. +Walks a header tree and collects all descendant leaf headers. -This is the static implementation behind the matching header instance API and can account for nested header groups. +The header itself is included after its descendants, matching the recursive +shape used by nested header groups. ## Type Parameters @@ -42,5 +43,5 @@ This is the static implementation behind the matching header instance API and ca ## Example ```ts -const value = header_getLeafHeaders(header) +const leafHeaders = header_getLeafHeaders(header) ``` diff --git a/docs/reference/static-functions/functions/header_getResizeHandler.md b/docs/reference/static-functions/functions/header_getResizeHandler.md index 188dd364ce..c1e8bcec03 100644 --- a/docs/reference/static-functions/functions/header_getResizeHandler.md +++ b/docs/reference/static-functions/functions/header_getResizeHandler.md @@ -9,11 +9,13 @@ title: header_getResizeHandler function header_getResizeHandler(header, _contextDocument?): (event) => void; ``` -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L88) +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L92) -Returns resize handler for a header. +Creates the pointer/touch start handler for resizing a header. -This is the static implementation behind the matching header instance API and can account for nested header groups. +The handler records starting sizes for all leaf headers, tracks drag deltas, +writes transient resize info, and commits column sizes on change or drag end +depending on `columnResizeMode`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/header_getSize.md b/docs/reference/static-functions/functions/header_getSize.md index 65019110a5..b390d1604e 100644 --- a/docs/reference/static-functions/functions/header_getSize.md +++ b/docs/reference/static-functions/functions/header_getSize.md @@ -9,11 +9,12 @@ title: header_getSize function header_getSize(header): number; ``` -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:185](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L185) +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:193](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L193) -Returns size for a header. +Computes a header's rendered size from its leaf headers. -This is the static implementation behind the matching header instance API and can account for nested header groups. +Group headers sum the sizes of all descendant leaf columns. Leaf headers use +their column's current size. ## Type Parameters @@ -42,5 +43,5 @@ This is the static implementation behind the matching header instance API and ca ## Example ```ts -const value = header_getSize(header) +const width = header_getSize(header) ``` diff --git a/docs/reference/static-functions/functions/header_getStart.md b/docs/reference/static-functions/functions/header_getStart.md index b8721b5815..29b81534e1 100644 --- a/docs/reference/static-functions/functions/header_getStart.md +++ b/docs/reference/static-functions/functions/header_getStart.md @@ -9,11 +9,12 @@ title: header_getStart function header_getStart(header): number; ``` -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:215](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L215) +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:224](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L224) -Returns start for a header. +Computes a header's offset from the start of its header group. -This is the static implementation behind the matching header instance API and can account for nested header groups. +The offset is the previous sibling header's start plus size, or `0` for the +first header in the group. ## Type Parameters @@ -42,5 +43,5 @@ This is the static implementation behind the matching header instance API and ca ## Example ```ts -const value = header_getStart(header) +const offset = header_getStart(header) ``` diff --git a/docs/reference/static-functions/functions/isRowSelected.md b/docs/reference/static-functions/functions/isRowSelected.md index c42a60b0a8..8f2aeb1506 100644 --- a/docs/reference/static-functions/functions/isRowSelected.md +++ b/docs/reference/static-functions/functions/isRowSelected.md @@ -9,7 +9,7 @@ title: isRowSelected function isRowSelected(row): boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:668](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L668) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:669](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L669) Returns whether a row id is selected in the current row selection state. diff --git a/docs/reference/static-functions/functions/isSubRowSelected.md b/docs/reference/static-functions/functions/isSubRowSelected.md index cf3545dcc3..dcbdb11f8a 100644 --- a/docs/reference/static-functions/functions/isSubRowSelected.md +++ b/docs/reference/static-functions/functions/isSubRowSelected.md @@ -9,7 +9,7 @@ title: isSubRowSelected function isSubRowSelected(row): boolean | "some" | "all"; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:685](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L685) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:686](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L686) Returns whether all, some, or none of a row's selectable descendants are selected. diff --git a/docs/reference/static-functions/functions/isTouchStartEvent.md b/docs/reference/static-functions/functions/isTouchStartEvent.md index 603fd8dd17..df07a45416 100644 --- a/docs/reference/static-functions/functions/isTouchStartEvent.md +++ b/docs/reference/static-functions/functions/isTouchStartEvent.md @@ -9,11 +9,12 @@ title: isTouchStartEvent function isTouchStartEvent(e): e is TouchEvent; ``` -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:355](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L355) +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:364](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L364) -Returns whether an event is a touch-start event. +Narrows an unknown event to a `touchstart` event. -Column resizing uses this to normalize mouse and touch resize interactions. +Column resizing uses this before reading touch coordinates and installing +touch-specific listeners. ## Parameters diff --git a/docs/reference/static-functions/functions/orderColumns.md b/docs/reference/static-functions/functions/orderColumns.md index 9a19593166..e4ca70d86c 100644 --- a/docs/reference/static-functions/functions/orderColumns.md +++ b/docs/reference/static-functions/functions/orderColumns.md @@ -9,11 +9,13 @@ title: orderColumns function orderColumns(table, leafColumns): Column_Internal[]; ``` -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:191](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L191) +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:203](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L203) -Orders leaf columns with manual ordering, grouping, and pinning rules. +Applies grouped-column placement rules to an already ordered leaf-column list. -This helper is used by the column ordering feature to produce the final visible column order. +`groupedColumnMode: 'remove'` drops grouped columns from the list. +`groupedColumnMode: 'reorder'` moves grouped columns to the front in grouping +state order. ## Type Parameters @@ -42,5 +44,5 @@ This helper is used by the column ordering feature to produce the final visible ## Example ```ts -const orderedColumns = orderColumns(leafColumns, columnOrder, grouping, groupedColumnMode) +const orderedColumns = orderColumns(table, leafColumns) ``` diff --git a/docs/reference/static-functions/functions/passiveEventSupported.md b/docs/reference/static-functions/functions/passiveEventSupported.md index 85204c9c59..c7962b9975 100644 --- a/docs/reference/static-functions/functions/passiveEventSupported.md +++ b/docs/reference/static-functions/functions/passiveEventSupported.md @@ -9,11 +9,12 @@ title: passiveEventSupported function passiveEventSupported(): boolean; ``` -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:320](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L320) +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:328](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L328) Detects whether the current environment supports passive event listeners. -Column resizing uses this to register pointer and touch listeners with the safest available options. +Column resizing uses this to register pointer and touch listeners with +`passive: false` only when the environment understands passive options. ## Returns diff --git a/docs/reference/static-functions/functions/row_getAllCells.md b/docs/reference/static-functions/functions/row_getAllCells.md index 990340b900..9e670180e5 100644 --- a/docs/reference/static-functions/functions/row_getAllCells.md +++ b/docs/reference/static-functions/functions/row_getAllCells.md @@ -9,11 +9,12 @@ title: row_getAllCells function row_getAllCells(row): Cell[]; ``` -Defined in: [core/rows/coreRowsFeature.utils.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L163) +Defined in: [core/rows/coreRowsFeature.utils.ts:167](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L167) -Returns all cells for a row. +Constructs one cell for each leaf column in this row. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +The result follows `table.getAllLeafColumns()` order and includes hidden +columns; visibility-specific APIs filter this list later. ## Type Parameters @@ -38,5 +39,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getAllCells(row) +const cells = row_getAllCells(row) ``` diff --git a/docs/reference/static-functions/functions/row_getAllCellsByColumnId.md b/docs/reference/static-functions/functions/row_getAllCellsByColumnId.md index c40ec7e372..980ca8cce7 100644 --- a/docs/reference/static-functions/functions/row_getAllCellsByColumnId.md +++ b/docs/reference/static-functions/functions/row_getAllCellsByColumnId.md @@ -9,11 +9,11 @@ title: row_getAllCellsByColumnId function row_getAllCellsByColumnId(row): Record>; ``` -Defined in: [core/rows/coreRowsFeature.utils.ts:182](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L182) +Defined in: [core/rows/coreRowsFeature.utils.ts:191](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L191) -Returns all cells by column id for a row. +Builds a lookup map of this row's cells keyed by column id. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +This is the static implementation behind `row.getAllCellsByColumnId()`. ## Type Parameters @@ -38,5 +38,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getAllCellsByColumnId(row) +const cellsById = row_getAllCellsByColumnId(row) ``` diff --git a/docs/reference/static-functions/functions/row_getCanPin.md b/docs/reference/static-functions/functions/row_getCanPin.md index 948d7a9126..8c9f3a07ad 100644 --- a/docs/reference/static-functions/functions/row_getCanPin.md +++ b/docs/reference/static-functions/functions/row_getCanPin.md @@ -9,7 +9,7 @@ title: row_getCanPin function row_getCanPin(row): boolean; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:202](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L202) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:204](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L204) Returns whether a row can use pin. diff --git a/docs/reference/static-functions/functions/row_getCenterVisibleCells.md b/docs/reference/static-functions/functions/row_getCenterVisibleCells.md index e3743ade0c..09eaaf979f 100644 --- a/docs/reference/static-functions/functions/row_getCenterVisibleCells.md +++ b/docs/reference/static-functions/functions/row_getCenterVisibleCells.md @@ -9,11 +9,11 @@ title: row_getCenterVisibleCells function row_getCenterVisibleCells(row): any[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:178](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L178) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:189](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L189) -Returns center visible cells for a row. +Collects visible cells whose columns are not pinned left or right. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +The result preserves the row's visible-cell order for center columns. ## Type Parameters @@ -38,5 +38,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getCenterVisibleCells(row) +const centerCells = row_getCenterVisibleCells(row) ``` diff --git a/docs/reference/static-functions/functions/row_getGroupingValue.md b/docs/reference/static-functions/functions/row_getGroupingValue.md index 77bd6e0289..019c8ecbee 100644 --- a/docs/reference/static-functions/functions/row_getGroupingValue.md +++ b/docs/reference/static-functions/functions/row_getGroupingValue.md @@ -9,11 +9,12 @@ title: row_getGroupingValue function row_getGroupingValue(row, columnId): any; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:258](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L258) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:268](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L268) -Returns grouping value for a row. +Reads and caches this row's grouping value for a column. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +`columnDef.getGroupingValue` wins when provided; otherwise the normal row +accessor value is used. ## Type Parameters @@ -49,5 +50,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getGroupingValue(row) +const groupValue = row_getGroupingValue(row, 'status') ``` diff --git a/docs/reference/static-functions/functions/row_getIsGrouped.md b/docs/reference/static-functions/functions/row_getIsGrouped.md index 86eeef153d..cc16a37cf4 100644 --- a/docs/reference/static-functions/functions/row_getIsGrouped.md +++ b/docs/reference/static-functions/functions/row_getIsGrouped.md @@ -9,11 +9,11 @@ title: row_getIsGrouped function row_getIsGrouped(row): boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:241](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L241) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:250](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L250) -Returns is grouped for a row. +Checks whether this row was created as a grouped row. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +Grouped rows carry a `groupingColumnId`; ordinary leaf rows do not. ## Type Parameters @@ -45,5 +45,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getIsGrouped(row) +const isGrouped = row_getIsGrouped(row) ``` diff --git a/docs/reference/static-functions/functions/row_getIsPinned.md b/docs/reference/static-functions/functions/row_getIsPinned.md index 213796f684..1f9563411e 100644 --- a/docs/reference/static-functions/functions/row_getIsPinned.md +++ b/docs/reference/static-functions/functions/row_getIsPinned.md @@ -9,7 +9,7 @@ title: row_getIsPinned function row_getIsPinned(row): RowPinningPosition; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:223](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L223) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:225](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L225) Returns is pinned for a row. diff --git a/docs/reference/static-functions/functions/row_getLeafRows.md b/docs/reference/static-functions/functions/row_getLeafRows.md index cbadc0f4ea..4c6a89e1ce 100644 --- a/docs/reference/static-functions/functions/row_getLeafRows.md +++ b/docs/reference/static-functions/functions/row_getLeafRows.md @@ -9,11 +9,11 @@ title: row_getLeafRows function row_getLeafRows(row): Row[]; ``` -Defined in: [core/rows/coreRowsFeature.utils.ts:103](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L103) +Defined in: [core/rows/coreRowsFeature.utils.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L105) -Returns leaf rows for a row. +Flattens this row's descendant tree into leaf rows. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +The row itself is not included; only nested `subRows` are walked. ## Type Parameters @@ -38,5 +38,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getLeafRows(row) +const descendants = row_getLeafRows(row) ``` diff --git a/docs/reference/static-functions/functions/row_getLeftVisibleCells.md b/docs/reference/static-functions/functions/row_getLeftVisibleCells.md index 81bf5e8b47..2c282f9f01 100644 --- a/docs/reference/static-functions/functions/row_getLeftVisibleCells.md +++ b/docs/reference/static-functions/functions/row_getLeftVisibleCells.md @@ -9,11 +9,12 @@ title: row_getLeftVisibleCells function row_getLeftVisibleCells(row): Cell[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:203](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L203) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:215](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L215) -Returns left visible cells for a row. +Collects visible cells for columns pinned to the left region. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +Cells are returned in `state.columnPinning.left` order and are marked with +`cell.position = 'left'`. ## Type Parameters @@ -38,5 +39,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getLeftVisibleCells(row) +const leftCells = row_getLeftVisibleCells(row) ``` diff --git a/docs/reference/static-functions/functions/row_getParentRow.md b/docs/reference/static-functions/functions/row_getParentRow.md index c333cb8747..d41773982a 100644 --- a/docs/reference/static-functions/functions/row_getParentRow.md +++ b/docs/reference/static-functions/functions/row_getParentRow.md @@ -11,11 +11,12 @@ function row_getParentRow(row): | undefined; ``` -Defined in: [core/rows/coreRowsFeature.utils.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L120) +Defined in: [core/rows/coreRowsFeature.utils.ts:123](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L123) -Returns parent row for a row. +Looks up this row's direct parent, if it has one. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +Parent lookup searches the pre-pagination row model so parent relationships +are available even when the parent is not on the current page. ## Type Parameters @@ -41,5 +42,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getParentRow(row) +const parent = row_getParentRow(row) ``` diff --git a/docs/reference/static-functions/functions/row_getParentRows.md b/docs/reference/static-functions/functions/row_getParentRows.md index e3da7693a1..8c632cd4da 100644 --- a/docs/reference/static-functions/functions/row_getParentRows.md +++ b/docs/reference/static-functions/functions/row_getParentRows.md @@ -9,11 +9,11 @@ title: row_getParentRows function row_getParentRows(row): Row[]; ``` -Defined in: [core/rows/coreRowsFeature.utils.ts:137](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L137) +Defined in: [core/rows/coreRowsFeature.utils.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L140) -Returns parent rows for a row. +Collects this row's ancestor chain from root to direct parent. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +The current row is not included. Rows without a parent return an empty array. ## Type Parameters @@ -38,5 +38,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getParentRows(row) +const ancestors = row_getParentRows(row) ``` diff --git a/docs/reference/static-functions/functions/row_getPinnedIndex.md b/docs/reference/static-functions/functions/row_getPinnedIndex.md index 38a1a0e33a..551e9030ab 100644 --- a/docs/reference/static-functions/functions/row_getPinnedIndex.md +++ b/docs/reference/static-functions/functions/row_getPinnedIndex.md @@ -9,7 +9,7 @@ title: row_getPinnedIndex function row_getPinnedIndex(row): number; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:247](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L247) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:249](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L249) Returns pinned index for a row. diff --git a/docs/reference/static-functions/functions/row_getRightVisibleCells.md b/docs/reference/static-functions/functions/row_getRightVisibleCells.md index fd37ca3a53..d93ab84d5c 100644 --- a/docs/reference/static-functions/functions/row_getRightVisibleCells.md +++ b/docs/reference/static-functions/functions/row_getRightVisibleCells.md @@ -6,14 +6,15 @@ title: row_getRightVisibleCells # Function: row\_getRightVisibleCells() ```ts -function row_getRightVisibleCells(row): any[]; +function row_getRightVisibleCells(row): Cell[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:237](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L237) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:251](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L251) -Returns right visible cells for a row. +Collects visible cells for columns pinned to the right region. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +Cells are returned in `state.columnPinning.right` order and are marked with +`cell.position = 'right'`. ## Type Parameters @@ -33,10 +34,10 @@ This is the static implementation behind the matching row instance API and may r ## Returns -`any`[] +[`Cell`](../../index/type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] ## Example ```ts -const value = row_getRightVisibleCells(row) +const rightCells = row_getRightVisibleCells(row) ``` diff --git a/docs/reference/static-functions/functions/row_getUniqueValues.md b/docs/reference/static-functions/functions/row_getUniqueValues.md index 541fd8152d..ea17b86311 100644 --- a/docs/reference/static-functions/functions/row_getUniqueValues.md +++ b/docs/reference/static-functions/functions/row_getUniqueValues.md @@ -9,11 +9,12 @@ title: row_getUniqueValues function row_getUniqueValues(row, columnId): unknown; ``` -Defined in: [core/rows/coreRowsFeature.utils.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L48) +Defined in: [core/rows/coreRowsFeature.utils.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L50) -Returns unique values for a row. +Reads and caches the values used by faceting/grouping for a column. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +If the column defines `getUniqueValues`, that result is used. Otherwise the +row's accessor value is wrapped in a single-item array. ## Type Parameters @@ -42,5 +43,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getUniqueValues(row) +const values = row_getUniqueValues(row, 'tags') ``` diff --git a/docs/reference/static-functions/functions/row_getValue.md b/docs/reference/static-functions/functions/row_getValue.md index bdeb6fb7de..d46152a12d 100644 --- a/docs/reference/static-functions/functions/row_getValue.md +++ b/docs/reference/static-functions/functions/row_getValue.md @@ -9,11 +9,12 @@ title: row_getValue function row_getValue(row, columnId): unknown; ``` -Defined in: [core/rows/coreRowsFeature.utils.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L19) +Defined in: [core/rows/coreRowsFeature.utils.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L20) -Returns value for a row. +Reads and caches this row's value for a column. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +The value is produced by the column accessor. Missing columns or display +columns without an accessor return `undefined`. ## Type Parameters @@ -42,5 +43,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getValue(row) +const firstName = row_getValue(row, 'firstName') ``` diff --git a/docs/reference/static-functions/functions/row_getVisibleCells.md b/docs/reference/static-functions/functions/row_getVisibleCells.md index 78c9cdd686..c8b6a4996a 100644 --- a/docs/reference/static-functions/functions/row_getVisibleCells.md +++ b/docs/reference/static-functions/functions/row_getVisibleCells.md @@ -9,11 +9,12 @@ title: row_getVisibleCells function row_getVisibleCells(row): Cell[]; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:129](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L129) +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:135](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L135) -Returns visible cells for a row. +Collects the cells from this row whose columns are visible. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +When column pinning is active, the result is ordered as left-pinned cells, +center cells, then right-pinned cells. ## Type Parameters @@ -38,5 +39,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getVisibleCells(row) +const visibleCells = row_getVisibleCells(row) ``` diff --git a/docs/reference/static-functions/functions/row_getVisibleCellsByColumnId.md b/docs/reference/static-functions/functions/row_getVisibleCellsByColumnId.md new file mode 100644 index 0000000000..1003515530 --- /dev/null +++ b/docs/reference/static-functions/functions/row_getVisibleCellsByColumnId.md @@ -0,0 +1,42 @@ +--- +id: row_getVisibleCellsByColumnId +title: row_getVisibleCellsByColumnId +--- + +# Function: row\_getVisibleCellsByColumnId() + +```ts +function row_getVisibleCellsByColumnId(row): Record>; +``` + +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:191](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L191) + +Builds a lookup map of this row's visible cells keyed by column id. + +Hidden columns are omitted from the map. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../../index/interfaces/TableFeatures.md) + +### TData + +`TData` *extends* [`RowData`](../../index/type-aliases/RowData.md) + +## Parameters + +### row + +[`Row`](../../index/type-aliases/Row.md)\<`TFeatures`, `TData`\> + +## Returns + +`Record`\<`string`, [`Cell`](../../index/type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>\> + +## Example + +```ts +const visibleCellsById = row_getVisibleCellsByColumnId(row) +``` diff --git a/docs/reference/static-functions/functions/row_pin.md b/docs/reference/static-functions/functions/row_pin.md index 1d2ed704fe..2762690256 100644 --- a/docs/reference/static-functions/functions/row_pin.md +++ b/docs/reference/static-functions/functions/row_pin.md @@ -13,7 +13,7 @@ function row_pin( includeParentRows?): void; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:274](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L274) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:276](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L276) Pins or unpins a row. diff --git a/docs/reference/static-functions/functions/row_renderValue.md b/docs/reference/static-functions/functions/row_renderValue.md index 83beb9f378..fb9bca7641 100644 --- a/docs/reference/static-functions/functions/row_renderValue.md +++ b/docs/reference/static-functions/functions/row_renderValue.md @@ -9,7 +9,7 @@ title: row_renderValue function row_renderValue(row, columnId): any; ``` -Defined in: [core/rows/coreRowsFeature.utils.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L86) +Defined in: [core/rows/coreRowsFeature.utils.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L88) Returns a renderable row value for a column. @@ -43,5 +43,5 @@ instead. ## Example ```ts -const value = row_renderValue(row) +const value = row_renderValue(row, 'firstName') ``` diff --git a/docs/reference/static-functions/functions/shouldAutoRemoveFilter.md b/docs/reference/static-functions/functions/shouldAutoRemoveFilter.md index d6968c52ce..8d8f9ab6e4 100644 --- a/docs/reference/static-functions/functions/shouldAutoRemoveFilter.md +++ b/docs/reference/static-functions/functions/shouldAutoRemoveFilter.md @@ -12,7 +12,7 @@ function shouldAutoRemoveFilter( column?): boolean; ``` -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:304](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L304) +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:315](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L315) Returns whether a filter value should be removed from filter state. diff --git a/docs/reference/static-functions/functions/table_autoResetPageIndex.md b/docs/reference/static-functions/functions/table_autoResetPageIndex.md index a17ffe04b9..cf13ad74cb 100644 --- a/docs/reference/static-functions/functions/table_autoResetPageIndex.md +++ b/docs/reference/static-functions/functions/table_autoResetPageIndex.md @@ -9,11 +9,13 @@ title: table_autoResetPageIndex function table_autoResetPageIndex(table): void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L37) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L40) -Schedules an automatic reset for page index. +Resets the page index when a page-altering change should return to page 0. -The reset only runs when the related feature options allow automatic resets for the current table state change. +The reset runs when `autoResetAll`, `autoResetPageIndex`, or the default +client-side pagination behavior allows it. Manual pagination opts out unless +the reset options explicitly opt back in. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_firstPage.md b/docs/reference/static-functions/functions/table_firstPage.md index 5e8bb08a46..998c90240a 100644 --- a/docs/reference/static-functions/functions/table_firstPage.md +++ b/docs/reference/static-functions/functions/table_firstPage.md @@ -9,7 +9,7 @@ title: table_firstPage function table_firstPage(table): void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:321](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L321) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:335](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L335) Moves the table to the first page. diff --git a/docs/reference/static-functions/functions/table_getAllColumns.md b/docs/reference/static-functions/functions/table_getAllColumns.md index 71fc12521a..3d3653cd75 100644 --- a/docs/reference/static-functions/functions/table_getAllColumns.md +++ b/docs/reference/static-functions/functions/table_getAllColumns.md @@ -9,11 +9,12 @@ title: table_getAllColumns function table_getAllColumns(table): Column[]; ``` -Defined in: [core/columns/coreColumnsFeature.utils.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L115) +Defined in: [core/columns/coreColumnsFeature.utils.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L120) -Returns all columns for the table. +Normalizes `options.columns` into the table's nested column tree. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Each column definition is constructed with its parent and depth, and group +column children are recursively constructed. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getAllColumns(table) +const columns = table_getAllColumns(table) ``` diff --git a/docs/reference/static-functions/functions/table_getAllFlatColumns.md b/docs/reference/static-functions/functions/table_getAllFlatColumns.md index 943c5df0c5..68cfb29332 100644 --- a/docs/reference/static-functions/functions/table_getAllFlatColumns.md +++ b/docs/reference/static-functions/functions/table_getAllFlatColumns.md @@ -9,11 +9,12 @@ title: table_getAllFlatColumns function table_getAllFlatColumns(table): Column[]; ``` -Defined in: [core/columns/coreColumnsFeature.utils.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L156) +Defined in: [core/columns/coreColumnsFeature.utils.ts:162](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L162) -Returns all flat columns for the table. +Flattens every table column, including group columns and leaf columns. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Use this when parent/group columns must be included in addition to data leaf +columns. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getAllFlatColumns(table) +const flatColumns = table_getAllFlatColumns(table) ``` diff --git a/docs/reference/static-functions/functions/table_getAllFlatColumnsById.md b/docs/reference/static-functions/functions/table_getAllFlatColumnsById.md index 02d25107a5..3ed7653f93 100644 --- a/docs/reference/static-functions/functions/table_getAllFlatColumnsById.md +++ b/docs/reference/static-functions/functions/table_getAllFlatColumnsById.md @@ -9,11 +9,12 @@ title: table_getAllFlatColumnsById function table_getAllFlatColumnsById(table): Record>; ``` -Defined in: [core/columns/coreColumnsFeature.utils.ts:175](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L175) +Defined in: [core/columns/coreColumnsFeature.utils.ts:182](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L182) -Returns all flat columns by id for the table. +Builds an id lookup for every flat column in the table. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Group columns and leaf columns are included. Later columns with the same id +replace earlier entries. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getAllFlatColumnsById(table) +const columnsById = table_getAllFlatColumnsById(table) ``` diff --git a/docs/reference/static-functions/functions/table_getAllLeafColumns.md b/docs/reference/static-functions/functions/table_getAllLeafColumns.md index 57988907b6..52b1e4b096 100644 --- a/docs/reference/static-functions/functions/table_getAllLeafColumns.md +++ b/docs/reference/static-functions/functions/table_getAllLeafColumns.md @@ -9,11 +9,12 @@ title: table_getAllLeafColumns function table_getAllLeafColumns(table): Column[]; ``` -Defined in: [core/columns/coreColumnsFeature.utils.ts:198](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L198) +Defined in: [core/columns/coreColumnsFeature.utils.ts:208](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L208) -Returns all leaf columns for the table. +Collects all terminal leaf columns in their current table order. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Column ordering features can reorder the collected leaves before the result +is returned. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getAllLeafColumns(table) +const leafColumns = table_getAllLeafColumns(table) ``` diff --git a/docs/reference/static-functions/functions/table_getAllLeafColumnsById.md b/docs/reference/static-functions/functions/table_getAllLeafColumnsById.md index 2134f5460e..52c626f8c3 100644 --- a/docs/reference/static-functions/functions/table_getAllLeafColumnsById.md +++ b/docs/reference/static-functions/functions/table_getAllLeafColumnsById.md @@ -9,11 +9,12 @@ title: table_getAllLeafColumnsById function table_getAllLeafColumnsById(table): Record>; ``` -Defined in: [core/columns/coreColumnsFeature.utils.ts:224](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L224) +Defined in: [core/columns/coreColumnsFeature.utils.ts:235](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L235) -Returns all leaf columns by id for the table. +Builds an id lookup for terminal leaf columns only. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Parent/group columns are excluded, making this lookup appropriate for row +cells and feature state keyed by data columns. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getAllLeafColumnsById(table) +const leavesById = table_getAllLeafColumnsById(table) ``` diff --git a/docs/reference/static-functions/functions/table_getBottomRows.md b/docs/reference/static-functions/functions/table_getBottomRows.md index 4d5ffabb76..7b78e4ea86 100644 --- a/docs/reference/static-functions/functions/table_getBottomRows.md +++ b/docs/reference/static-functions/functions/table_getBottomRows.md @@ -9,7 +9,7 @@ title: table_getBottomRows function table_getBottomRows(table): Row[]; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:161](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L161) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L163) Returns bottom rows for the table. diff --git a/docs/reference/static-functions/functions/table_getCanNextPage.md b/docs/reference/static-functions/functions/table_getCanNextPage.md index afa4a6e955..9d976b7377 100644 --- a/docs/reference/static-functions/functions/table_getCanNextPage.md +++ b/docs/reference/static-functions/functions/table_getCanNextPage.md @@ -9,11 +9,12 @@ title: table_getCanNextPage function table_getCanNextPage(table): boolean; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:254](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L254) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:268](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L268) -Returns can next page for the table. +Checks whether the current page index can move forward. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +A `pageCount` of `-1` means the caller does not know the total page count, so +this returns `true`. A page count of `0` returns `false`. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getCanNextPage(table) +const canGoForward = table_getCanNextPage(table) ``` diff --git a/docs/reference/static-functions/functions/table_getCanPreviousPage.md b/docs/reference/static-functions/functions/table_getCanPreviousPage.md index 6aa8a9868b..144109fb24 100644 --- a/docs/reference/static-functions/functions/table_getCanPreviousPage.md +++ b/docs/reference/static-functions/functions/table_getCanPreviousPage.md @@ -9,11 +9,12 @@ title: table_getCanPreviousPage function table_getCanPreviousPage(table): boolean; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:237](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L237) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:250](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L250) -Returns can previous page for the table. +Checks whether the current page index can move backward. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The first page is page index `0`, so only positive page indexes can navigate +to a previous page. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getCanPreviousPage(table) +const canGoBack = table_getCanPreviousPage(table) ``` diff --git a/docs/reference/static-functions/functions/table_getCenterFlatHeaders.md b/docs/reference/static-functions/functions/table_getCenterFlatHeaders.md index a022f58d67..cbe0c99f44 100644 --- a/docs/reference/static-functions/functions/table_getCenterFlatHeaders.md +++ b/docs/reference/static-functions/functions/table_getCenterFlatHeaders.md @@ -6,14 +6,14 @@ title: table_getCenterFlatHeaders # Function: table\_getCenterFlatHeaders() ```ts -function table_getCenterFlatHeaders(table): any[]; +function table_getCenterFlatHeaders(table): Header[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:570](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L570) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:598](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L598) -Returns center flat headers for the table. +Flattens every header from the center header groups. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Parent headers and placeholder headers are included. ## Type Parameters @@ -33,10 +33,10 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Returns -`any`[] +[`Header`](../../index/type-aliases/Header.md)\<`TFeatures`, `TData`, `unknown`\>[] ## Example ```ts -const value = table_getCenterFlatHeaders(table) +const headers = table_getCenterFlatHeaders(table) ``` diff --git a/docs/reference/static-functions/functions/table_getCenterFooterGroups.md b/docs/reference/static-functions/functions/table_getCenterFooterGroups.md index fcb61cb745..ac7675064e 100644 --- a/docs/reference/static-functions/functions/table_getCenterFooterGroups.md +++ b/docs/reference/static-functions/functions/table_getCenterFooterGroups.md @@ -9,11 +9,11 @@ title: table_getCenterFooterGroups function table_getCenterFooterGroups(table): any[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:494](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L494) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:516](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L516) -Returns center footer groups for the table. +Builds footer groups for the center, unpinned region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Footer groups reuse the center header groups in reverse order. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getCenterFooterGroups(table) +const footerGroups = table_getCenterFooterGroups(table) ``` diff --git a/docs/reference/static-functions/functions/table_getCenterHeaderGroups.md b/docs/reference/static-functions/functions/table_getCenterHeaderGroups.md index 2182aa3519..dabab65b0e 100644 --- a/docs/reference/static-functions/functions/table_getCenterHeaderGroups.md +++ b/docs/reference/static-functions/functions/table_getCenterHeaderGroups.md @@ -9,11 +9,12 @@ title: table_getCenterHeaderGroups function table_getCenterHeaderGroups(table): HeaderGroup[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:416](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L416) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:438](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L438) -Returns center header groups for the table. +Builds header groups for visible columns that are not pinned. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Left- and right-pinned column ids are removed from the visible leaf column +list before header groups are built for the center region. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getCenterHeaderGroups(table) +const headerGroups = table_getCenterHeaderGroups(table) ``` diff --git a/docs/reference/static-functions/functions/table_getCenterLeafColumns.md b/docs/reference/static-functions/functions/table_getCenterLeafColumns.md index f674f15823..53d19c01a5 100644 --- a/docs/reference/static-functions/functions/table_getCenterLeafColumns.md +++ b/docs/reference/static-functions/functions/table_getCenterLeafColumns.md @@ -9,11 +9,11 @@ title: table_getCenterLeafColumns function table_getCenterLeafColumns(table): Column[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:713](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L713) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:746](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L746) -Returns center leaf columns for the table. +Resolves leaf columns that are not pinned to either side. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Left- and right-pinned ids are removed from `table.getAllLeafColumns()`. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getCenterLeafColumns(table) +const columns = table_getCenterLeafColumns(table) ``` diff --git a/docs/reference/static-functions/functions/table_getCenterLeafHeaders.md b/docs/reference/static-functions/functions/table_getCenterLeafHeaders.md index 1e22991e67..a0305e0b95 100644 --- a/docs/reference/static-functions/functions/table_getCenterLeafHeaders.md +++ b/docs/reference/static-functions/functions/table_getCenterLeafHeaders.md @@ -9,11 +9,11 @@ title: table_getCenterLeafHeaders function table_getCenterLeafHeaders(table): any[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:640](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L640) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:671](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L671) -Returns center leaf headers for the table. +Collects leaf headers for the center, unpinned region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Parent headers are filtered out from the center flat header list. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getCenterLeafHeaders(table) +const headers = table_getCenterLeafHeaders(table) ``` diff --git a/docs/reference/static-functions/functions/table_getCenterRows.md b/docs/reference/static-functions/functions/table_getCenterRows.md index 43ef1721b8..beef189d01 100644 --- a/docs/reference/static-functions/functions/table_getCenterRows.md +++ b/docs/reference/static-functions/functions/table_getCenterRows.md @@ -9,7 +9,7 @@ title: table_getCenterRows function table_getCenterRows(table): Row[]; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:178](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L178) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:180](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L180) Returns center rows for the table. diff --git a/docs/reference/static-functions/functions/table_getCenterTotalSize.md b/docs/reference/static-functions/functions/table_getCenterTotalSize.md index 1c4679a1cf..502c496aa4 100644 --- a/docs/reference/static-functions/functions/table_getCenterTotalSize.md +++ b/docs/reference/static-functions/functions/table_getCenterTotalSize.md @@ -9,11 +9,11 @@ title: table_getCenterTotalSize function table_getCenterTotalSize(table): any; ``` -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:332](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L332) +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:343](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L343) -Returns center total size for the table. +Sums the rendered size of the center, unpinned header region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +An empty center region returns `0`. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getCenterTotalSize(table) +const width = table_getCenterTotalSize(table) ``` diff --git a/docs/reference/static-functions/functions/table_getCenterVisibleLeafColumns.md b/docs/reference/static-functions/functions/table_getCenterVisibleLeafColumns.md index f80112430d..2ec8d51723 100644 --- a/docs/reference/static-functions/functions/table_getCenterVisibleLeafColumns.md +++ b/docs/reference/static-functions/functions/table_getCenterVisibleLeafColumns.md @@ -9,11 +9,12 @@ title: table_getCenterVisibleLeafColumns function table_getCenterVisibleLeafColumns(table): any[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:819](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L819) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:854](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L854) -Returns center visible leaf columns for the table. +Resolves visible leaf columns that are not pinned. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +This is the center partition used by layouts that render pinned columns +separately from the scrollable middle region. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getCenterVisibleLeafColumns(table) +const columns = table_getCenterVisibleLeafColumns(table) ``` diff --git a/docs/reference/static-functions/functions/table_getColumn.md b/docs/reference/static-functions/functions/table_getColumn.md index d695d28962..4a0ab8af80 100644 --- a/docs/reference/static-functions/functions/table_getColumn.md +++ b/docs/reference/static-functions/functions/table_getColumn.md @@ -11,11 +11,12 @@ function table_getColumn(table, columnId): | undefined; ``` -Defined in: [core/columns/coreColumnsFeature.utils.ts:247](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L247) +Defined in: [core/columns/coreColumnsFeature.utils.ts:261](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L261) -Returns column for the table. +Looks up a column by id from the flat column map. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The lookup can return group columns or leaf columns. In development, a +missing id logs a warning to help catch stale column references. ## Type Parameters @@ -45,5 +46,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getColumn(table) +const column = table_getColumn(table, 'firstName') ``` diff --git a/docs/reference/static-functions/functions/table_getCoreRowModel.md b/docs/reference/static-functions/functions/table_getCoreRowModel.md index 5d233bcbb1..6d040c8e7c 100644 --- a/docs/reference/static-functions/functions/table_getCoreRowModel.md +++ b/docs/reference/static-functions/functions/table_getCoreRowModel.md @@ -9,11 +9,12 @@ title: table_getCoreRowModel function table_getCoreRowModel(table): RowModel; ``` -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L17) +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L18) -Returns core row model for the table. +Resolves the table's unmodified core row model. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The factory is created once per table, either from `options._rowModels.coreRowModel` +or the built-in `createCoreRowModel()`, then reused for later calls. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getCoreRowModel(table) +const coreRows = table_getCoreRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getDefaultColumnDef.md b/docs/reference/static-functions/functions/table_getDefaultColumnDef.md index d77e02de8f..d97ce8d6a6 100644 --- a/docs/reference/static-functions/functions/table_getDefaultColumnDef.md +++ b/docs/reference/static-functions/functions/table_getDefaultColumnDef.md @@ -9,11 +9,13 @@ title: table_getDefaultColumnDef function table_getDefaultColumnDef(table): Partial>; ``` -Defined in: [core/columns/coreColumnsFeature.utils.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L76) +Defined in: [core/columns/coreColumnsFeature.utils.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L80) -Returns default column def for the table. +Merges built-in, feature, and user default column definitions. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Built-in defaults provide a header and fallback cell renderer, feature +defaults can add feature-specific column options, and +`options.defaultColumn` wins last. ## Type Parameters @@ -38,5 +40,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getDefaultColumnDef(table) +const defaultColumn = table_getDefaultColumnDef(table) ``` diff --git a/docs/reference/static-functions/functions/table_getExpandedRowModel.md b/docs/reference/static-functions/functions/table_getExpandedRowModel.md index 471768e182..ff9320edb6 100644 --- a/docs/reference/static-functions/functions/table_getExpandedRowModel.md +++ b/docs/reference/static-functions/functions/table_getExpandedRowModel.md @@ -9,11 +9,12 @@ title: table_getExpandedRowModel function table_getExpandedRowModel(table): RowModel; ``` -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:186](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L186) +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:194](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L194) -Returns expanded row model for the table. +Resolves the row model after expanded rows have been flattened into view. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +When `manualExpanding` is enabled, or no expanded row-model factory was +registered, this returns the pre-expanded row model unchanged. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getExpandedRowModel(table) +const expandedRows = table_getExpandedRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getFilteredRowModel.md b/docs/reference/static-functions/functions/table_getFilteredRowModel.md index a9dedd8526..e79e26c72e 100644 --- a/docs/reference/static-functions/functions/table_getFilteredRowModel.md +++ b/docs/reference/static-functions/functions/table_getFilteredRowModel.md @@ -9,11 +9,13 @@ title: table_getFilteredRowModel function table_getFilteredRowModel(table): RowModel; ``` -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L57) +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L61) -Returns filtered row model for the table. +Resolves the row model after column and global filtering. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +When `manualFiltering` is enabled, or no filtered row-model factory was +registered, this returns the pre-filtered row model because filtering is +expected to happen outside the table. ## Type Parameters @@ -38,5 +40,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getFilteredRowModel(table) +const filteredRows = table_getFilteredRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getFlatHeaders.md b/docs/reference/static-functions/functions/table_getFlatHeaders.md index f3f1ad163d..e5d4dbccb8 100644 --- a/docs/reference/static-functions/functions/table_getFlatHeaders.md +++ b/docs/reference/static-functions/functions/table_getFlatHeaders.md @@ -9,11 +9,12 @@ title: table_getFlatHeaders function table_getFlatHeaders(table): Header[]; ``` -Defined in: [core/headers/coreHeadersFeature.utils.ts:158](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L158) +Defined in: [core/headers/coreHeadersFeature.utils.ts:161](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L161) -Returns flat headers for the table. +Flattens every header from every header group into one array. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The result includes parent headers and placeholder headers, in header-group +order from top to bottom. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getFlatHeaders(table) +const flatHeaders = table_getFlatHeaders(table) ``` diff --git a/docs/reference/static-functions/functions/table_getFooterGroups.md b/docs/reference/static-functions/functions/table_getFooterGroups.md index d6beeea2b8..32fbbd40e9 100644 --- a/docs/reference/static-functions/functions/table_getFooterGroups.md +++ b/docs/reference/static-functions/functions/table_getFooterGroups.md @@ -9,11 +9,12 @@ title: table_getFooterGroups function table_getFooterGroups(table): HeaderGroup[]; ``` -Defined in: [core/headers/coreHeadersFeature.utils.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L140) +Defined in: [core/headers/coreHeadersFeature.utils.ts:142](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L142) -Returns footer groups for the table. +Builds footer groups by reversing the current header groups. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Footer rendering uses the same header objects and grouping structure, but +renders them from leaf level back toward the root. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getFooterGroups(table) +const footerGroups = table_getFooterGroups(table) ``` diff --git a/docs/reference/static-functions/functions/table_getGlobalAutoFilterFn.md b/docs/reference/static-functions/functions/table_getGlobalAutoFilterFn.md index 3cfe7619cd..6f65b4a0c2 100644 --- a/docs/reference/static-functions/functions/table_getGlobalAutoFilterFn.md +++ b/docs/reference/static-functions/functions/table_getGlobalAutoFilterFn.md @@ -9,11 +9,12 @@ title: table_getGlobalAutoFilterFn function table_getGlobalAutoFilterFn(): FilterFn; ``` -Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L43) +Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L45) -Returns global auto filter fn for the table. +Provides the built-in automatic global filter function. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Global filtering defaults to `includesString`, which gives search-box style +matching across globally filterable columns. ## Returns @@ -22,5 +23,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getGlobalAutoFilterFn(table) +const filterFn = table_getGlobalAutoFilterFn() ``` diff --git a/docs/reference/static-functions/functions/table_getGlobalFacetedMinMaxValues.md b/docs/reference/static-functions/functions/table_getGlobalFacetedMinMaxValues.md index e0d7277dba..6ce3a3fcdb 100644 --- a/docs/reference/static-functions/functions/table_getGlobalFacetedMinMaxValues.md +++ b/docs/reference/static-functions/functions/table_getGlobalFacetedMinMaxValues.md @@ -9,11 +9,12 @@ title: table_getGlobalFacetedMinMaxValues function table_getGlobalFacetedMinMaxValues(table): [number, number] | undefined; ``` -Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L89) +Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L94) -Returns global faceted min max values for the table. +Computes min and max numeric facet values for the global filter context. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The global context is requested with the internal `__global__` column id. If +no factory is registered, the result is `undefined`. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getGlobalFacetedMinMaxValues(table) +const range = table_getGlobalFacetedMinMaxValues(table) ``` diff --git a/docs/reference/static-functions/functions/table_getGlobalFacetedRowModel.md b/docs/reference/static-functions/functions/table_getGlobalFacetedRowModel.md index 4490a71a04..592edb3e03 100644 --- a/docs/reference/static-functions/functions/table_getGlobalFacetedRowModel.md +++ b/docs/reference/static-functions/functions/table_getGlobalFacetedRowModel.md @@ -9,11 +9,13 @@ title: table_getGlobalFacetedRowModel function table_getGlobalFacetedRowModel(table): RowModel; ``` -Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L109) +Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:116](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L116) -Returns global faceted row model for the table. +Computes the row model used to derive global facet values. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The global context is requested with the internal `__global__` column id. If +no faceted row-model factory is registered, the pre-filtered row model is +returned. ## Type Parameters @@ -38,5 +40,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getGlobalFacetedRowModel(table) +const rows = table_getGlobalFacetedRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getGlobalFacetedUniqueValues.md b/docs/reference/static-functions/functions/table_getGlobalFacetedUniqueValues.md index 73aeef11c1..d92d670f9d 100644 --- a/docs/reference/static-functions/functions/table_getGlobalFacetedUniqueValues.md +++ b/docs/reference/static-functions/functions/table_getGlobalFacetedUniqueValues.md @@ -9,11 +9,12 @@ title: table_getGlobalFacetedUniqueValues function table_getGlobalFacetedUniqueValues(table): Map; ``` -Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:129](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L129) +Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:137](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L137) -Returns global faceted unique values for the table. +Computes unique values and occurrence counts for the global filter context. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The global context is requested with the internal `__global__` column id. If +no factory is registered, an empty `Map` is returned. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getGlobalFacetedUniqueValues(table) +const values = table_getGlobalFacetedUniqueValues(table) ``` diff --git a/docs/reference/static-functions/functions/table_getGlobalFilterFn.md b/docs/reference/static-functions/functions/table_getGlobalFilterFn.md index ef46b6d0d7..b8bba60b30 100644 --- a/docs/reference/static-functions/functions/table_getGlobalFilterFn.md +++ b/docs/reference/static-functions/functions/table_getGlobalFilterFn.md @@ -11,11 +11,13 @@ function table_getGlobalFilterFn(table): | undefined; ``` -Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L57) +Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L61) -Returns global filter fn for the table. +Resolves the filter function used for global filtering. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Function-valued `options.globalFilterFn` is returned directly, `'auto'` +delegates to `table_getGlobalAutoFilterFn`, and string values are looked up in +the table's filter function registry. ## Type Parameters @@ -41,5 +43,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getGlobalFilterFn(table) +const filterFn = table_getGlobalFilterFn(table) ``` diff --git a/docs/reference/static-functions/functions/table_getGroupedRowModel.md b/docs/reference/static-functions/functions/table_getGroupedRowModel.md index f42d4af58d..f85a389534 100644 --- a/docs/reference/static-functions/functions/table_getGroupedRowModel.md +++ b/docs/reference/static-functions/functions/table_getGroupedRowModel.md @@ -9,11 +9,12 @@ title: table_getGroupedRowModel function table_getGroupedRowModel(table): RowModel; ``` -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L100) +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L105) -Returns grouped row model for the table. +Resolves the row model after grouping has produced grouped and aggregated rows. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +When `manualGrouping` is enabled, or no grouped row-model factory was +registered, this returns the pre-grouped row model unchanged. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getGroupedRowModel(table) +const groupedRows = table_getGroupedRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getHeaderGroups.md b/docs/reference/static-functions/functions/table_getHeaderGroups.md index 89435efb5e..27d2d6165d 100644 --- a/docs/reference/static-functions/functions/table_getHeaderGroups.md +++ b/docs/reference/static-functions/functions/table_getHeaderGroups.md @@ -9,11 +9,12 @@ title: table_getHeaderGroups function table_getHeaderGroups(table): HeaderGroup[]; ``` -Defined in: [core/headers/coreHeadersFeature.utils.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L81) +Defined in: [core/headers/coreHeadersFeature.utils.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L78) -Returns header groups for the table. +Builds visible header groups for the current column tree. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Column visibility and pinning are applied before groups are built. When no +columns are pinned, the fast path skips pin partitioning. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getHeaderGroups(table) +const headerGroups = table_getHeaderGroups(table) ``` diff --git a/docs/reference/static-functions/functions/table_getIsAllColumnsVisible.md b/docs/reference/static-functions/functions/table_getIsAllColumnsVisible.md index 0cf4be3c4c..793cf03d74 100644 --- a/docs/reference/static-functions/functions/table_getIsAllColumnsVisible.md +++ b/docs/reference/static-functions/functions/table_getIsAllColumnsVisible.md @@ -9,11 +9,12 @@ title: table_getIsAllColumnsVisible function table_getIsAllColumnsVisible(table): boolean; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:286](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L286) +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:330](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L330) -Returns is all columns visible for the table. +Checks whether every leaf column is currently visible. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Non-hideable columns are naturally visible because missing visibility entries +default to `true`. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getIsAllColumnsVisible(table) +const allVisible = table_getIsAllColumnsVisible(table) ``` diff --git a/docs/reference/static-functions/functions/table_getIsSomeColumnsPinned.md b/docs/reference/static-functions/functions/table_getIsSomeColumnsPinned.md index 5e54796811..a68365e116 100644 --- a/docs/reference/static-functions/functions/table_getIsSomeColumnsPinned.md +++ b/docs/reference/static-functions/functions/table_getIsSomeColumnsPinned.md @@ -9,11 +9,12 @@ title: table_getIsSomeColumnsPinned function table_getIsSomeColumnsPinned(table, position?): boolean; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:318](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L318) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:337](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L337) -Returns is some columns pinned for the table. +Checks whether any columns are pinned. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Omit `position` to check both sides, or pass `'left'`/`'right'` to inspect a +single pinning region. ## Type Parameters @@ -42,5 +43,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getIsSomeColumnsPinned(table) +const hasPinnedColumns = table_getIsSomeColumnsPinned(table) ``` diff --git a/docs/reference/static-functions/functions/table_getIsSomeColumnsVisible.md b/docs/reference/static-functions/functions/table_getIsSomeColumnsVisible.md index ab135cc32c..f2b3a26c13 100644 --- a/docs/reference/static-functions/functions/table_getIsSomeColumnsVisible.md +++ b/docs/reference/static-functions/functions/table_getIsSomeColumnsVisible.md @@ -9,11 +9,11 @@ title: table_getIsSomeColumnsVisible function table_getIsSomeColumnsVisible(table): boolean; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:308](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L308) +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:352](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L352) -Returns is some columns visible for the table. +Checks whether at least one leaf column is currently visible. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +This is useful for tri-state "show all columns" controls. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getIsSomeColumnsVisible(table) +const someVisible = table_getIsSomeColumnsVisible(table) ``` diff --git a/docs/reference/static-functions/functions/table_getLeafHeaders.md b/docs/reference/static-functions/functions/table_getLeafHeaders.md index 899e5e4fa9..9471270865 100644 --- a/docs/reference/static-functions/functions/table_getLeafHeaders.md +++ b/docs/reference/static-functions/functions/table_getLeafHeaders.md @@ -6,14 +6,15 @@ title: table_getLeafHeaders # Function: table\_getLeafHeaders() ```ts -function table_getLeafHeaders(table): any[]; +function table_getLeafHeaders(table): Header[]; ``` -Defined in: [core/headers/coreHeadersFeature.utils.ts:180](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L180) +Defined in: [core/headers/coreHeadersFeature.utils.ts:187](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L187) -Returns leaf headers for the table. +Collects only the leaf headers from the current header tree. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Parent/group headers are skipped, making the result suitable for rendering +one header per visible leaf column. ## Type Parameters @@ -33,10 +34,10 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Returns -`any`[] +[`Header`](../../index/type-aliases/Header.md)\<`TFeatures`, `TData`, `unknown`\>[] ## Example ```ts -const value = table_getLeafHeaders(table) +const leafHeaders = table_getLeafHeaders(table) ``` diff --git a/docs/reference/static-functions/functions/table_getLeftFlatHeaders.md b/docs/reference/static-functions/functions/table_getLeftFlatHeaders.md index 550d199a0a..2317cf6ffd 100644 --- a/docs/reference/static-functions/functions/table_getLeftFlatHeaders.md +++ b/docs/reference/static-functions/functions/table_getLeftFlatHeaders.md @@ -6,14 +6,14 @@ title: table_getLeftFlatHeaders # Function: table\_getLeftFlatHeaders() ```ts -function table_getLeftFlatHeaders(table): any[]; +function table_getLeftFlatHeaders(table): Header[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:518](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L518) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:540](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L540) -Returns left flat headers for the table. +Flattens every header from the left pinned header groups. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Parent headers and placeholder headers are included. ## Type Parameters @@ -33,10 +33,10 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Returns -`any`[] +[`Header`](../../index/type-aliases/Header.md)\<`TFeatures`, `TData`, `unknown`\>[] ## Example ```ts -const value = table_getLeftFlatHeaders(table) +const headers = table_getLeftFlatHeaders(table) ``` diff --git a/docs/reference/static-functions/functions/table_getLeftFooterGroups.md b/docs/reference/static-functions/functions/table_getLeftFooterGroups.md index b721a7bd99..1e467514a7 100644 --- a/docs/reference/static-functions/functions/table_getLeftFooterGroups.md +++ b/docs/reference/static-functions/functions/table_getLeftFooterGroups.md @@ -9,11 +9,11 @@ title: table_getLeftFooterGroups function table_getLeftFooterGroups(table): any[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:450](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L450) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:472](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L472) -Returns left footer groups for the table. +Builds footer groups for the left pinned region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Footer groups reuse the left header groups in reverse order. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getLeftFooterGroups(table) +const footerGroups = table_getLeftFooterGroups(table) ``` diff --git a/docs/reference/static-functions/functions/table_getLeftHeaderGroups.md b/docs/reference/static-functions/functions/table_getLeftHeaderGroups.md index bf7c5d4bc2..eb1a14c8aa 100644 --- a/docs/reference/static-functions/functions/table_getLeftHeaderGroups.md +++ b/docs/reference/static-functions/functions/table_getLeftHeaderGroups.md @@ -9,11 +9,12 @@ title: table_getLeftHeaderGroups function table_getLeftHeaderGroups(table): HeaderGroup[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:342](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L342) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:362](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L362) -Returns left header groups for the table. +Builds header groups for visible columns pinned to the left region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The leaf columns are read in `state.columnPinning.left` order and then passed +through the same header-group builder as the unpinned table. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getLeftHeaderGroups(table) +const headerGroups = table_getLeftHeaderGroups(table) ``` diff --git a/docs/reference/static-functions/functions/table_getLeftLeafColumns.md b/docs/reference/static-functions/functions/table_getLeftLeafColumns.md index 4c5d9931d1..8522096c2b 100644 --- a/docs/reference/static-functions/functions/table_getLeftLeafColumns.md +++ b/docs/reference/static-functions/functions/table_getLeftLeafColumns.md @@ -9,11 +9,12 @@ title: table_getLeftLeafColumns function table_getLeftLeafColumns(table): Column_Internal[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:663](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L663) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:695](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L695) -Returns left leaf columns for the table. +Resolves leaf columns pinned to the left region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The result follows `state.columnPinning.left` order and skips stale ids that +no longer correspond to a leaf column. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getLeftLeafColumns(table) +const columns = table_getLeftLeafColumns(table) ``` diff --git a/docs/reference/static-functions/functions/table_getLeftLeafHeaders.md b/docs/reference/static-functions/functions/table_getLeftLeafHeaders.md index fe286f5e79..d4da6f0198 100644 --- a/docs/reference/static-functions/functions/table_getLeftLeafHeaders.md +++ b/docs/reference/static-functions/functions/table_getLeftLeafHeaders.md @@ -9,11 +9,11 @@ title: table_getLeftLeafHeaders function table_getLeftLeafHeaders(table): any[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:598](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L598) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:629](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L629) -Returns left leaf headers for the table. +Collects leaf headers for the left pinned region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Parent headers are filtered out from the left flat header list. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getLeftLeafHeaders(table) +const headers = table_getLeftLeafHeaders(table) ``` diff --git a/docs/reference/static-functions/functions/table_getLeftTotalSize.md b/docs/reference/static-functions/functions/table_getLeftTotalSize.md index 31afd609b4..05f041a409 100644 --- a/docs/reference/static-functions/functions/table_getLeftTotalSize.md +++ b/docs/reference/static-functions/functions/table_getLeftTotalSize.md @@ -9,11 +9,11 @@ title: table_getLeftTotalSize function table_getLeftTotalSize(table): any; ``` -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:307](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L307) +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:318](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L318) -Returns left total size for the table. +Sums the rendered size of the left pinned header region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +An empty left pinning region returns `0`. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getLeftTotalSize(table) +const width = table_getLeftTotalSize(table) ``` diff --git a/docs/reference/static-functions/functions/table_getLeftVisibleLeafColumns.md b/docs/reference/static-functions/functions/table_getLeftVisibleLeafColumns.md index 0daeb189aa..b719bdf086 100644 --- a/docs/reference/static-functions/functions/table_getLeftVisibleLeafColumns.md +++ b/docs/reference/static-functions/functions/table_getLeftVisibleLeafColumns.md @@ -9,11 +9,11 @@ title: table_getLeftVisibleLeafColumns function table_getLeftVisibleLeafColumns(table): any[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:773](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L773) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:807](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L807) -Returns left visible leaf columns for the table. +Resolves visible leaf columns pinned to the left region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Hidden pinned columns are filtered out after the left pin order is applied. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getLeftVisibleLeafColumns(table) +const columns = table_getLeftVisibleLeafColumns(table) ``` diff --git a/docs/reference/static-functions/functions/table_getOrderColumnsFn.md b/docs/reference/static-functions/functions/table_getOrderColumnsFn.md index 940b0150cc..b9f42b8527 100644 --- a/docs/reference/static-functions/functions/table_getOrderColumnsFn.md +++ b/docs/reference/static-functions/functions/table_getOrderColumnsFn.md @@ -9,11 +9,12 @@ title: table_getOrderColumnsFn function table_getOrderColumnsFn(table): (columns) => Column_Internal[]; ``` -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:139](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L139) +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L144) -Returns order columns fn for the table. +Creates the ordering function used to arrange leaf columns. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The returned function applies `state.columnOrder`, preserves unspecified +columns in their original order, then delegates to grouping rules. ## Type Parameters @@ -50,5 +51,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getOrderColumnsFn(table) +const orderColumnsForTable = table_getOrderColumnsFn(table) ``` diff --git a/docs/reference/static-functions/functions/table_getPageCount.md b/docs/reference/static-functions/functions/table_getPageCount.md index aea62aaa1e..f75d5c2d01 100644 --- a/docs/reference/static-functions/functions/table_getPageCount.md +++ b/docs/reference/static-functions/functions/table_getPageCount.md @@ -9,11 +9,12 @@ title: table_getPageCount function table_getPageCount(table): number; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:355](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L355) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:370](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L370) -Returns page count for the table. +Resolves the number of pages for the current pagination state. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +`options.pageCount` wins for manual pagination. Otherwise the value is +calculated from `table_getRowCount(table)` and the current `pageSize`. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getPageCount(table) +const pages = table_getPageCount(table) ``` diff --git a/docs/reference/static-functions/functions/table_getPageOptions.md b/docs/reference/static-functions/functions/table_getPageOptions.md index a08bb6d5b0..cdd084180c 100644 --- a/docs/reference/static-functions/functions/table_getPageOptions.md +++ b/docs/reference/static-functions/functions/table_getPageOptions.md @@ -9,11 +9,12 @@ title: table_getPageOptions function table_getPageOptions(table): number[]; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:215](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L215) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:227](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L227) -Returns page options for the table. +Builds the zero-based page indexes available for the current page count. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Unknown or empty page counts return an empty array; otherwise the result is +`[0, 1, ...pageCount - 1]`. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getPageOptions(table) +const pageIndexes = table_getPageOptions(table) ``` diff --git a/docs/reference/static-functions/functions/table_getPaginatedRowModel.md b/docs/reference/static-functions/functions/table_getPaginatedRowModel.md index d3cdb0e5b0..6f111f4e43 100644 --- a/docs/reference/static-functions/functions/table_getPaginatedRowModel.md +++ b/docs/reference/static-functions/functions/table_getPaginatedRowModel.md @@ -9,11 +9,13 @@ title: table_getPaginatedRowModel function table_getPaginatedRowModel(table): RowModel; ``` -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:229](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L229) +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:240](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L240) -Returns paginated row model for the table. +Resolves the row model after pagination has sliced rows for the current page. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +When `manualPagination` is enabled, or no paginated row-model factory was +registered, this returns the pre-paginated row model because pagination is +expected to happen before data reaches the table. ## Type Parameters @@ -38,5 +40,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getPaginatedRowModel(table) +const pageRows = table_getPaginatedRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getPinnedLeafColumns.md b/docs/reference/static-functions/functions/table_getPinnedLeafColumns.md index 377f1db431..ec4a84480c 100644 --- a/docs/reference/static-functions/functions/table_getPinnedLeafColumns.md +++ b/docs/reference/static-functions/functions/table_getPinnedLeafColumns.md @@ -9,11 +9,12 @@ title: table_getPinnedLeafColumns function table_getPinnedLeafColumns(table, position): any[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:733](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L733) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:767](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L767) -Returns pinned leaf columns for the table. +Resolves leaf columns for a requested pinning region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Pass `'left'`, `'center'`, or `'right'` for a partition, or pass `false` to +read all leaf columns without partitioning. ## Type Parameters @@ -42,5 +43,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getPinnedLeafColumns(table) +const columns = table_getPinnedLeafColumns(table, 'center') ``` diff --git a/docs/reference/static-functions/functions/table_getPinnedVisibleLeafColumns.md b/docs/reference/static-functions/functions/table_getPinnedVisibleLeafColumns.md index 388c65cf0a..dfcac4f821 100644 --- a/docs/reference/static-functions/functions/table_getPinnedVisibleLeafColumns.md +++ b/docs/reference/static-functions/functions/table_getPinnedVisibleLeafColumns.md @@ -9,11 +9,12 @@ title: table_getPinnedVisibleLeafColumns function table_getPinnedVisibleLeafColumns(table, position?): any[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:842](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L842) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:878](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L878) -Returns pinned visible leaf columns for the table. +Resolves visible leaf columns for a requested pinning region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Omit `position` to get all visible leaf columns, or pass `'left'`, `'center'`, +or `'right'` to get one partition. ## Type Parameters @@ -42,5 +43,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getPinnedVisibleLeafColumns(table) +const columns = table_getPinnedVisibleLeafColumns(table, 'left') ``` diff --git a/docs/reference/static-functions/functions/table_getPreExpandedRowModel.md b/docs/reference/static-functions/functions/table_getPreExpandedRowModel.md index aed1349715..c31ada2a0d 100644 --- a/docs/reference/static-functions/functions/table_getPreExpandedRowModel.md +++ b/docs/reference/static-functions/functions/table_getPreExpandedRowModel.md @@ -9,11 +9,11 @@ title: table_getPreExpandedRowModel function table_getPreExpandedRowModel(table): RowModel; ``` -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:169](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L169) +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:176](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L176) -Returns pre expanded row model for the table. +Reads the row model immediately before row expansion. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Expansion runs after sorting, so this aliases `table.getSortedRowModel()`. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getPreExpandedRowModel(table) +const rowsBeforeExpansion = table_getPreExpandedRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getPreFilteredRowModel.md b/docs/reference/static-functions/functions/table_getPreFilteredRowModel.md index 545f071b45..1992f19e7b 100644 --- a/docs/reference/static-functions/functions/table_getPreFilteredRowModel.md +++ b/docs/reference/static-functions/functions/table_getPreFilteredRowModel.md @@ -9,11 +9,12 @@ title: table_getPreFilteredRowModel function table_getPreFilteredRowModel(table): RowModel; ``` -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L40) +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L42) -Returns pre filtered row model for the table. +Reads the row model immediately before column/global filtering. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Filtering is the first derived row-model stage, so this currently aliases +`table.getCoreRowModel()`. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getPreFilteredRowModel(table) +const rowsBeforeFiltering = table_getPreFilteredRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getPreGroupedRowModel.md b/docs/reference/static-functions/functions/table_getPreGroupedRowModel.md index cced5587be..735b5b741e 100644 --- a/docs/reference/static-functions/functions/table_getPreGroupedRowModel.md +++ b/docs/reference/static-functions/functions/table_getPreGroupedRowModel.md @@ -9,11 +9,11 @@ title: table_getPreGroupedRowModel function table_getPreGroupedRowModel(table): RowModel; ``` -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L83) +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L87) -Returns pre grouped row model for the table. +Reads the row model immediately before grouping. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Grouping runs after filtering, so this aliases `table.getFilteredRowModel()`. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getPreGroupedRowModel(table) +const rowsBeforeGrouping = table_getPreGroupedRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getPrePaginatedRowModel.md b/docs/reference/static-functions/functions/table_getPrePaginatedRowModel.md index 906b368b48..2f03eba7d9 100644 --- a/docs/reference/static-functions/functions/table_getPrePaginatedRowModel.md +++ b/docs/reference/static-functions/functions/table_getPrePaginatedRowModel.md @@ -9,11 +9,12 @@ title: table_getPrePaginatedRowModel function table_getPrePaginatedRowModel(table): RowModel; ``` -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:212](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L212) +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:221](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L221) -Returns pre paginated row model for the table. +Reads the row model immediately before pagination. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Pagination is the final built-in row-model stage, so this aliases +`table.getExpandedRowModel()`. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getPrePaginatedRowModel(table) +const rowsBeforePagination = table_getPrePaginatedRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getPreSortedRowModel.md b/docs/reference/static-functions/functions/table_getPreSortedRowModel.md index a4727b7774..ff2d8ea9d4 100644 --- a/docs/reference/static-functions/functions/table_getPreSortedRowModel.md +++ b/docs/reference/static-functions/functions/table_getPreSortedRowModel.md @@ -9,11 +9,11 @@ title: table_getPreSortedRowModel function table_getPreSortedRowModel(table): RowModel; ``` -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L126) +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:131](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L131) -Returns pre sorted row model for the table. +Reads the row model immediately before sorting. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Sorting runs after grouping, so this aliases `table.getGroupedRowModel()`. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getPreSortedRowModel(table) +const rowsBeforeSorting = table_getPreSortedRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getRightFlatHeaders.md b/docs/reference/static-functions/functions/table_getRightFlatHeaders.md index 6c32bb9360..f57ccef3a4 100644 --- a/docs/reference/static-functions/functions/table_getRightFlatHeaders.md +++ b/docs/reference/static-functions/functions/table_getRightFlatHeaders.md @@ -6,14 +6,14 @@ title: table_getRightFlatHeaders # Function: table\_getRightFlatHeaders() ```ts -function table_getRightFlatHeaders(table): any[]; +function table_getRightFlatHeaders(table): Header[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:544](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L544) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:569](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L569) -Returns right flat headers for the table. +Flattens every header from the right pinned header groups. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Parent headers and placeholder headers are included. ## Type Parameters @@ -33,10 +33,10 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Returns -`any`[] +[`Header`](../../index/type-aliases/Header.md)\<`TFeatures`, `TData`, `unknown`\>[] ## Example ```ts -const value = table_getRightFlatHeaders(table) +const headers = table_getRightFlatHeaders(table) ``` diff --git a/docs/reference/static-functions/functions/table_getRightFooterGroups.md b/docs/reference/static-functions/functions/table_getRightFooterGroups.md index b6a0f87bf0..1d8c9f638d 100644 --- a/docs/reference/static-functions/functions/table_getRightFooterGroups.md +++ b/docs/reference/static-functions/functions/table_getRightFooterGroups.md @@ -9,11 +9,11 @@ title: table_getRightFooterGroups function table_getRightFooterGroups(table): any[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:472](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L472) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:494](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L494) -Returns right footer groups for the table. +Builds footer groups for the right pinned region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Footer groups reuse the right header groups in reverse order. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getRightFooterGroups(table) +const footerGroups = table_getRightFooterGroups(table) ``` diff --git a/docs/reference/static-functions/functions/table_getRightHeaderGroups.md b/docs/reference/static-functions/functions/table_getRightHeaderGroups.md index b2a94917a9..1338a828a5 100644 --- a/docs/reference/static-functions/functions/table_getRightHeaderGroups.md +++ b/docs/reference/static-functions/functions/table_getRightHeaderGroups.md @@ -9,11 +9,12 @@ title: table_getRightHeaderGroups function table_getRightHeaderGroups(table): HeaderGroup[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:379](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L379) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:400](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L400) -Returns right header groups for the table. +Builds header groups for visible columns pinned to the right region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The leaf columns are read in `state.columnPinning.right` order and then +passed through the same header-group builder as the unpinned table. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getRightHeaderGroups(table) +const headerGroups = table_getRightHeaderGroups(table) ``` diff --git a/docs/reference/static-functions/functions/table_getRightLeafColumns.md b/docs/reference/static-functions/functions/table_getRightLeafColumns.md index 087bca7f19..a060f8ca96 100644 --- a/docs/reference/static-functions/functions/table_getRightLeafColumns.md +++ b/docs/reference/static-functions/functions/table_getRightLeafColumns.md @@ -9,11 +9,12 @@ title: table_getRightLeafColumns function table_getRightLeafColumns(table): Column_Internal[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:688](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L688) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:721](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L721) -Returns right leaf columns for the table. +Resolves leaf columns pinned to the right region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The result follows `state.columnPinning.right` order and skips stale ids that +no longer correspond to a leaf column. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getRightLeafColumns(table) +const columns = table_getRightLeafColumns(table) ``` diff --git a/docs/reference/static-functions/functions/table_getRightLeafHeaders.md b/docs/reference/static-functions/functions/table_getRightLeafHeaders.md index 8710838762..7058ec4abc 100644 --- a/docs/reference/static-functions/functions/table_getRightLeafHeaders.md +++ b/docs/reference/static-functions/functions/table_getRightLeafHeaders.md @@ -9,11 +9,11 @@ title: table_getRightLeafHeaders function table_getRightLeafHeaders(table): any[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:619](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L619) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:650](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L650) -Returns right leaf headers for the table. +Collects leaf headers for the right pinned region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Parent headers are filtered out from the right flat header list. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getRightLeafHeaders(table) +const headers = table_getRightLeafHeaders(table) ``` diff --git a/docs/reference/static-functions/functions/table_getRightTotalSize.md b/docs/reference/static-functions/functions/table_getRightTotalSize.md index 99ff0e37b6..a2f60f6573 100644 --- a/docs/reference/static-functions/functions/table_getRightTotalSize.md +++ b/docs/reference/static-functions/functions/table_getRightTotalSize.md @@ -9,11 +9,11 @@ title: table_getRightTotalSize function table_getRightTotalSize(table): any; ``` -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:357](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L357) +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:368](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L368) -Returns right total size for the table. +Sums the rendered size of the right pinned header region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +An empty right pinning region returns `0`. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getRightTotalSize(table) +const width = table_getRightTotalSize(table) ``` diff --git a/docs/reference/static-functions/functions/table_getRightVisibleLeafColumns.md b/docs/reference/static-functions/functions/table_getRightVisibleLeafColumns.md index c80d9b9789..e9c8091311 100644 --- a/docs/reference/static-functions/functions/table_getRightVisibleLeafColumns.md +++ b/docs/reference/static-functions/functions/table_getRightVisibleLeafColumns.md @@ -9,11 +9,11 @@ title: table_getRightVisibleLeafColumns function table_getRightVisibleLeafColumns(table): any[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:796](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L796) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:830](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L830) -Returns right visible leaf columns for the table. +Resolves visible leaf columns pinned to the right region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Hidden pinned columns are filtered out after the right pin order is applied. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getRightVisibleLeafColumns(table) +const columns = table_getRightVisibleLeafColumns(table) ``` diff --git a/docs/reference/static-functions/functions/table_getRow.md b/docs/reference/static-functions/functions/table_getRow.md index cc1304b204..1d2df10932 100644 --- a/docs/reference/static-functions/functions/table_getRow.md +++ b/docs/reference/static-functions/functions/table_getRow.md @@ -12,11 +12,12 @@ function table_getRow( searchAll?): Row; ``` -Defined in: [core/rows/coreRowsFeature.utils.ts:228](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L228) +Defined in: [core/rows/coreRowsFeature.utils.ts:241](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L241) -Returns row for the table. +Looks up a row by id from the current or full row model. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +By default this searches `table.getRowModel()`. Passing `searchAll` searches +the pre-pagination model first, then falls back to the core model. ## Type Parameters @@ -49,5 +50,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getRow(table) +const row = table_getRow(table, rowId, true) ``` diff --git a/docs/reference/static-functions/functions/table_getRowCount.md b/docs/reference/static-functions/functions/table_getRowCount.md index c82c23ef79..10e465e5d8 100644 --- a/docs/reference/static-functions/functions/table_getRowCount.md +++ b/docs/reference/static-functions/functions/table_getRowCount.md @@ -9,11 +9,13 @@ title: table_getRowCount function table_getRowCount(table): number; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:378](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L378) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:395](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L395) -Returns row count for the table. +Resolves the total row count used for pagination math. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +`options.rowCount` wins for manual pagination. Otherwise the count comes +from the pre-paginated row model so filtering, grouping, sorting, and +expansion are reflected before the page slice is applied. ## Type Parameters @@ -38,5 +40,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getRowCount(table) +const rows = table_getRowCount(table) ``` diff --git a/docs/reference/static-functions/functions/table_getRowId.md b/docs/reference/static-functions/functions/table_getRowId.md index 7ce47dcbc3..a01e5aeaa0 100644 --- a/docs/reference/static-functions/functions/table_getRowId.md +++ b/docs/reference/static-functions/functions/table_getRowId.md @@ -13,11 +13,12 @@ function table_getRowId( parent?): string; ``` -Defined in: [core/rows/coreRowsFeature.utils.ts:203](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L203) +Defined in: [core/rows/coreRowsFeature.utils.ts:215](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L215) -Returns row id for the table. +Resolves the stable id for a row. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +`options.getRowId` wins when provided. Otherwise root rows use their index +and child rows append their index to the parent id, such as `0.2`. ## Type Parameters @@ -54,5 +55,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getRowId(table) +const id = table_getRowId(originalRow, table, index, parentRow) ``` diff --git a/docs/reference/static-functions/functions/table_getRowModel.md b/docs/reference/static-functions/functions/table_getRowModel.md index c4a0ebfef5..4f0a4c09ac 100644 --- a/docs/reference/static-functions/functions/table_getRowModel.md +++ b/docs/reference/static-functions/functions/table_getRowModel.md @@ -9,11 +9,12 @@ title: table_getRowModel function table_getRowModel(table): RowModel; ``` -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:255](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L255) +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:267](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L267) -Returns row model for the table. +Resolves the final row model consumed by renderers. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +This is the end of the built-in row-model pipeline: core -> filtering -> +grouping -> sorting -> expanding -> pagination. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getRowModel(table) +const visibleRows = table_getRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getSortedRowModel.md b/docs/reference/static-functions/functions/table_getSortedRowModel.md index a7f94fe689..fb537b2520 100644 --- a/docs/reference/static-functions/functions/table_getSortedRowModel.md +++ b/docs/reference/static-functions/functions/table_getSortedRowModel.md @@ -9,11 +9,13 @@ title: table_getSortedRowModel function table_getSortedRowModel(table): RowModel; ``` -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:143](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L143) +Defined in: [core/row-models/coreRowModelsFeature.utils.ts:150](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L150) -Returns sorted row model for the table. +Resolves the row model after sorting has been applied. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +When `manualSorting` is enabled, or no sorted row-model factory was +registered, this returns the pre-sorted row model because sorted data is +expected to be supplied by the caller. ## Type Parameters @@ -38,5 +40,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getSortedRowModel(table) +const sortedRows = table_getSortedRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getToggleAllColumnsVisibilityHandler.md b/docs/reference/static-functions/functions/table_getToggleAllColumnsVisibilityHandler.md index be9195b38e..72b845500f 100644 --- a/docs/reference/static-functions/functions/table_getToggleAllColumnsVisibilityHandler.md +++ b/docs/reference/static-functions/functions/table_getToggleAllColumnsVisibilityHandler.md @@ -9,11 +9,12 @@ title: table_getToggleAllColumnsVisibilityHandler function table_getToggleAllColumnsVisibilityHandler(table): (e) => void; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:329](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L329) +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:374](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L374) -Returns an event handler for all columns visibility handler. +Creates a checkbox-style handler that shows or hides all columns. -The handler calls the matching table toggle API and can be attached directly to checkbox or button UI. +The handler reads `event.target.checked`, so it is intended for controls whose +checked state means "all columns visible". ## Type Parameters @@ -50,5 +51,5 @@ The handler calls the matching table toggle API and can be attached directly to ## Example ```ts -const value = table_getToggleAllColumnsVisibilityHandler(table) +const onChange = table_getToggleAllColumnsVisibilityHandler(table) ``` diff --git a/docs/reference/static-functions/functions/table_getTopRows.md b/docs/reference/static-functions/functions/table_getTopRows.md index 4673365732..581248df0c 100644 --- a/docs/reference/static-functions/functions/table_getTopRows.md +++ b/docs/reference/static-functions/functions/table_getTopRows.md @@ -9,7 +9,7 @@ title: table_getTopRows function table_getTopRows(table): Row[]; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L144) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:146](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L146) Returns top rows for the table. diff --git a/docs/reference/static-functions/functions/table_getTotalSize.md b/docs/reference/static-functions/functions/table_getTotalSize.md index 200b38582a..6bcf707b20 100644 --- a/docs/reference/static-functions/functions/table_getTotalSize.md +++ b/docs/reference/static-functions/functions/table_getTotalSize.md @@ -9,11 +9,11 @@ title: table_getTotalSize function table_getTotalSize(table): number; ``` -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:286](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L286) +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:297](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L297) -Returns total size for the table. +Sums the rendered size of the full table header row. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +This includes left, center, and right columns in the main header group. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getTotalSize(table) +const width = table_getTotalSize(table) ``` diff --git a/docs/reference/static-functions/functions/table_getVisibleFlatColumns.md b/docs/reference/static-functions/functions/table_getVisibleFlatColumns.md index 54f69ad38c..0c4069e164 100644 --- a/docs/reference/static-functions/functions/table_getVisibleFlatColumns.md +++ b/docs/reference/static-functions/functions/table_getVisibleFlatColumns.md @@ -9,11 +9,12 @@ title: table_getVisibleFlatColumns function table_getVisibleFlatColumns(table): Column[]; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:179](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L179) +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:217](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L217) -Returns visible flat columns for the table. +Filters the flat column list down to visible columns. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Parent/group columns are included when `column_getIsVisible` considers them +visible. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getVisibleFlatColumns(table) +const columns = table_getVisibleFlatColumns(table) ``` diff --git a/docs/reference/static-functions/functions/table_getVisibleLeafColumns.md b/docs/reference/static-functions/functions/table_getVisibleLeafColumns.md index 0d8f4d59bf..3c081e13d7 100644 --- a/docs/reference/static-functions/functions/table_getVisibleLeafColumns.md +++ b/docs/reference/static-functions/functions/table_getVisibleLeafColumns.md @@ -9,11 +9,12 @@ title: table_getVisibleLeafColumns function table_getVisibleLeafColumns(table): Column[]; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:200](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L200) +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:239](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L239) -Returns visible leaf columns for the table. +Filters leaf columns down to those currently visible. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +This is the column list most row rendering code uses before pinning-specific +partitioning. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getVisibleLeafColumns(table) +const columns = table_getVisibleLeafColumns(table) ``` diff --git a/docs/reference/static-functions/functions/table_lastPage.md b/docs/reference/static-functions/functions/table_lastPage.md index 6d439705c7..bd3594dcc3 100644 --- a/docs/reference/static-functions/functions/table_lastPage.md +++ b/docs/reference/static-functions/functions/table_lastPage.md @@ -9,7 +9,7 @@ title: table_lastPage function table_lastPage(table): void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:338](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L338) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:352](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L352) Moves the table to the last known page. diff --git a/docs/reference/static-functions/functions/table_mergeOptions.md b/docs/reference/static-functions/functions/table_mergeOptions.md index dc22ae45d6..0b8893f6f9 100644 --- a/docs/reference/static-functions/functions/table_mergeOptions.md +++ b/docs/reference/static-functions/functions/table_mergeOptions.md @@ -9,7 +9,7 @@ title: table_mergeOptions function table_mergeOptions(table, newOptions): TableOptions; ``` -Defined in: [core/table/coreTablesFeature.utils.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.utils.ts#L76) +Defined in: [core/table/coreTablesFeature.utils.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.utils.ts#L78) Merges new table options with the current resolved options. @@ -43,5 +43,5 @@ options are shallow-merged. ## Example ```ts -const value = table_mergeOptions(table) +const options = table_mergeOptions(table, nextOptions) ``` diff --git a/docs/reference/static-functions/functions/table_nextPage.md b/docs/reference/static-functions/functions/table_nextPage.md index a7f7ea5261..67be603b53 100644 --- a/docs/reference/static-functions/functions/table_nextPage.md +++ b/docs/reference/static-functions/functions/table_nextPage.md @@ -9,7 +9,7 @@ title: table_nextPage function table_nextPage(table): void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:302](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L302) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:316](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L316) Moves the table to the next page. diff --git a/docs/reference/static-functions/functions/table_previousPage.md b/docs/reference/static-functions/functions/table_previousPage.md index 49dd50edf6..19dae33347 100644 --- a/docs/reference/static-functions/functions/table_previousPage.md +++ b/docs/reference/static-functions/functions/table_previousPage.md @@ -9,7 +9,7 @@ title: table_previousPage function table_previousPage(table): void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:284](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L284) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:298](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L298) Moves the table to the previous page. diff --git a/docs/reference/static-functions/functions/table_resetColumnFilters.md b/docs/reference/static-functions/functions/table_resetColumnFilters.md index 0eb88cfc69..402f0dccd7 100644 --- a/docs/reference/static-functions/functions/table_resetColumnFilters.md +++ b/docs/reference/static-functions/functions/table_resetColumnFilters.md @@ -9,11 +9,12 @@ title: table_resetColumnFilters function table_resetColumnFilters(table, defaultState?): void; ``` -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:284](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L284) +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:295](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L295) -Resets the table's column filters state slice. +Resets `columnFilters` to the configured initial state or feature default. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset clones `table.initialState.columnFilters` when it +exists. Passing `true` ignores initial state and resets to `[]`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_resetColumnOrder.md b/docs/reference/static-functions/functions/table_resetColumnOrder.md index 346d12fef7..5514d67a14 100644 --- a/docs/reference/static-functions/functions/table_resetColumnOrder.md +++ b/docs/reference/static-functions/functions/table_resetColumnOrder.md @@ -9,11 +9,12 @@ title: table_resetColumnOrder function table_resetColumnOrder(table, defaultState?): void; ``` -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L119) +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:123](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L123) -Resets the table's column order state slice. +Resets `columnOrder` to the configured initial state or feature default. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset clones `table.initialState.columnOrder` when it +exists. Passing `true` ignores initial state and resets to `[]`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_resetColumnPinning.md b/docs/reference/static-functions/functions/table_resetColumnPinning.md index 6496b3f950..c9e6570c34 100644 --- a/docs/reference/static-functions/functions/table_resetColumnPinning.md +++ b/docs/reference/static-functions/functions/table_resetColumnPinning.md @@ -9,11 +9,13 @@ title: table_resetColumnPinning function table_resetColumnPinning(table, defaultState?): void; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:294](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L294) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:312](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L312) -Resets the table's column pinning state slice. +Resets `columnPinning` to the configured initial state or feature default. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset clones `table.initialState.columnPinning` when it +exists. Passing `true` ignores initial state and resets to empty left/right +arrays. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_resetColumnSizing.md b/docs/reference/static-functions/functions/table_resetColumnSizing.md index 7bdbd80911..1f253d2ca0 100644 --- a/docs/reference/static-functions/functions/table_resetColumnSizing.md +++ b/docs/reference/static-functions/functions/table_resetColumnSizing.md @@ -9,11 +9,12 @@ title: table_resetColumnSizing function table_resetColumnSizing(table, defaultState?): void; ``` -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:266](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L266) +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:277](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L277) -Resets the table's column sizing state slice. +Resets `columnSizing` to the configured initial state or feature default. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset clones `table.initialState.columnSizing` when it +exists. Passing `true` ignores initial state and resets to `{}`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_resetColumnVisibility.md b/docs/reference/static-functions/functions/table_resetColumnVisibility.md index eafe042a5e..2e1fff038e 100644 --- a/docs/reference/static-functions/functions/table_resetColumnVisibility.md +++ b/docs/reference/static-functions/functions/table_resetColumnVisibility.md @@ -9,11 +9,12 @@ title: table_resetColumnVisibility function table_resetColumnVisibility(table, defaultState?): void; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:242](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L242) +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:283](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L283) -Resets the table's column visibility state slice. +Resets `columnVisibility` to the configured initial state or feature default. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset clones `table.initialState.columnVisibility` when +it exists. Passing `true` ignores initial state and resets to `{}`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_resetGlobalFilter.md b/docs/reference/static-functions/functions/table_resetGlobalFilter.md index 34ced8f7c4..258033c77b 100644 --- a/docs/reference/static-functions/functions/table_resetGlobalFilter.md +++ b/docs/reference/static-functions/functions/table_resetGlobalFilter.md @@ -9,11 +9,12 @@ title: table_resetGlobalFilter function table_resetGlobalFilter(table, defaultState?): void; ``` -Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L102) +Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L108) -Resets the table's global filter state slice. +Resets `globalFilter` to the configured initial state or feature default. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset clones `table.initialState.globalFilter`. Passing +`true` ignores initial state and resets to `undefined`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_resetGrouping.md b/docs/reference/static-functions/functions/table_resetGrouping.md index b7fd115c0a..572a90dfa3 100644 --- a/docs/reference/static-functions/functions/table_resetGrouping.md +++ b/docs/reference/static-functions/functions/table_resetGrouping.md @@ -9,11 +9,12 @@ title: table_resetGrouping function table_resetGrouping(table, defaultState?): void; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:221](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L221) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:230](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L230) -Resets the table's grouping state slice. +Resets `grouping` to the configured initial state or feature default. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset clones `table.initialState.grouping` when it +exists. Passing `true` ignores initial state and resets to `[]`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_resetHeaderSizeInfo.md b/docs/reference/static-functions/functions/table_resetHeaderSizeInfo.md index f67545d44a..0104e7d50a 100644 --- a/docs/reference/static-functions/functions/table_resetHeaderSizeInfo.md +++ b/docs/reference/static-functions/functions/table_resetHeaderSizeInfo.md @@ -9,11 +9,13 @@ title: table_resetHeaderSizeInfo function table_resetHeaderSizeInfo(table, defaultState?): void; ``` -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:296](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L296) +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:303](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L303) -Resets the table's header size info state slice. +Resets `columnResizing` to the configured initial state or feature default. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset clones `table.initialState.columnResizing` when +it exists. Passing `true` ignores initial state and resets to the no-drag +default state. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_resetPageIndex.md b/docs/reference/static-functions/functions/table_resetPageIndex.md index 2448950ae1..5f160b8a48 100644 --- a/docs/reference/static-functions/functions/table_resetPageIndex.md +++ b/docs/reference/static-functions/functions/table_resetPageIndex.md @@ -9,11 +9,12 @@ title: table_resetPageIndex function table_resetPageIndex(table, defaultState?): void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:141](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L141) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:150](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L150) -Resets the table's page index state slice. +Resets only `pagination.pageIndex`. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset uses `table.initialState.pagination?.pageIndex` +or `0`. Passing `true` always resets the page index to `0`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_resetPageSize.md b/docs/reference/static-functions/functions/table_resetPageSize.md index ab67bde2b6..769b37b7ee 100644 --- a/docs/reference/static-functions/functions/table_resetPageSize.md +++ b/docs/reference/static-functions/functions/table_resetPageSize.md @@ -9,11 +9,12 @@ title: table_resetPageSize function table_resetPageSize(table, defaultState?): void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:165](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L165) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:175](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L175) -Resets the table's page size state slice. +Resets only `pagination.pageSize`. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset uses `table.initialState.pagination?.pageSize` +or `10`. Passing `true` always resets the page size to `10`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_resetPagination.md b/docs/reference/static-functions/functions/table_resetPagination.md index 79c68de36a..c36a47292e 100644 --- a/docs/reference/static-functions/functions/table_resetPagination.md +++ b/docs/reference/static-functions/functions/table_resetPagination.md @@ -9,11 +9,13 @@ title: table_resetPagination function table_resetPagination(table, defaultState?): void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L84) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L91) -Resets the table's pagination state slice. +Resets `pagination` to the configured initial state or feature default. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset clones `table.initialState.pagination` when it +exists. Passing `true` ignores initial state and resets to +`{ pageIndex: 0, pageSize: 10 }`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_resetSorting.md b/docs/reference/static-functions/functions/table_resetSorting.md index c017e8c5b0..cb0ff1d72a 100644 --- a/docs/reference/static-functions/functions/table_resetSorting.md +++ b/docs/reference/static-functions/functions/table_resetSorting.md @@ -9,11 +9,12 @@ title: table_resetSorting function table_resetSorting(table, defaultState?): void; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L57) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L60) -Resets the table's sorting state slice. +Resets `sorting` to the configured initial state or feature default. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset clones `table.initialState.sorting` when it +exists. Passing `true` ignores initial state and resets to `[]`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_setColumnFilters.md b/docs/reference/static-functions/functions/table_setColumnFilters.md index 6d25d7f48a..b3c9859b89 100644 --- a/docs/reference/static-functions/functions/table_setColumnFilters.md +++ b/docs/reference/static-functions/functions/table_setColumnFilters.md @@ -9,11 +9,13 @@ title: table_setColumnFilters function table_setColumnFilters(table, updater): void; ``` -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:245](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L245) +Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:255](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L255) -Updates the table's column filters state slice. +Routes a column filter updater through the table's filter change handler. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +The resolved filters are cleaned before they are emitted: filters for known +columns are removed when their filter function says the value should be +auto-removed. ## Type Parameters @@ -42,5 +44,5 @@ The updater follows TanStack Table updater semantics and is routed through the c ## Example ```ts -table_setColumnFilters(table, (old) => old) +table_setColumnFilters(table, (old) => old.filter((filter) => filter.id !== 'age')) ``` diff --git a/docs/reference/static-functions/functions/table_setColumnOrder.md b/docs/reference/static-functions/functions/table_setColumnOrder.md index 4ccf3e62fb..82fae35453 100644 --- a/docs/reference/static-functions/functions/table_setColumnOrder.md +++ b/docs/reference/static-functions/functions/table_setColumnOrder.md @@ -9,11 +9,12 @@ title: table_setColumnOrder function table_setColumnOrder(table, updater): void; ``` -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L101) +Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L104) -Updates the table's column order state slice. +Routes a column order updater through the table's column-order change handler. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +The updater may be a next ordered id array or a function of the previous +array, matching the instance `table.setColumnOrder` behavior. ## Type Parameters @@ -42,5 +43,5 @@ The updater follows TanStack Table updater semantics and is routed through the c ## Example ```ts -table_setColumnOrder(table, (old) => old) +table_setColumnOrder(table, ['firstName', 'lastName', 'age']) ``` diff --git a/docs/reference/static-functions/functions/table_setColumnPinning.md b/docs/reference/static-functions/functions/table_setColumnPinning.md index 5674ce43ac..6f4c2dd1b5 100644 --- a/docs/reference/static-functions/functions/table_setColumnPinning.md +++ b/docs/reference/static-functions/functions/table_setColumnPinning.md @@ -9,11 +9,12 @@ title: table_setColumnPinning function table_setColumnPinning(table, updater): void; ``` -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:273](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L273) +Defined in: [features/column-pinning/columnPinningFeature.utils.ts:289](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L289) -Updates the table's column pinning state slice. +Routes a column pinning updater through the table's pinning change handler. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +The updater may be a next `{ left, right }` state or a function of the +previous state, matching the instance `table.setColumnPinning` behavior. ## Type Parameters @@ -42,5 +43,5 @@ The updater follows TanStack Table updater semantics and is routed through the c ## Example ```ts -table_setColumnPinning(table, (old) => old) +table_setColumnPinning(table, (old) => ({ ...old, left: ['select'] })) ``` diff --git a/docs/reference/static-functions/functions/table_setColumnResizing.md b/docs/reference/static-functions/functions/table_setColumnResizing.md index 6bbbd7e849..6432281a6e 100644 --- a/docs/reference/static-functions/functions/table_setColumnResizing.md +++ b/docs/reference/static-functions/functions/table_setColumnResizing.md @@ -9,11 +9,12 @@ title: table_setColumnResizing function table_setColumnResizing(table, updater): void; ``` -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:275](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L275) +Defined in: [features/column-resizing/columnResizingFeature.utils.ts:280](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L280) -Updates the table's column resizing state slice. +Routes a transient column resizing updater through the table's resize handler. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +This state tracks the active drag interaction; committed widths live in +`columnSizing`. ## Type Parameters @@ -42,5 +43,5 @@ The updater follows TanStack Table updater semantics and is routed through the c ## Example ```ts -table_setColumnResizing(table, (old) => old) +table_setColumnResizing(table, (old) => ({ ...old, deltaOffset: 12 })) ``` diff --git a/docs/reference/static-functions/functions/table_setColumnSizing.md b/docs/reference/static-functions/functions/table_setColumnSizing.md index 433fe40160..dd22e332a2 100644 --- a/docs/reference/static-functions/functions/table_setColumnSizing.md +++ b/docs/reference/static-functions/functions/table_setColumnSizing.md @@ -9,11 +9,12 @@ title: table_setColumnSizing function table_setColumnSizing(table, updater): void; ``` -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:245](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L245) +Defined in: [features/column-sizing/columnSizingFeature.utils.ts:255](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L255) -Updates the table's column sizing state slice. +Routes a committed column sizing updater through the table's sizing handler. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +The updater may be a next size map or a function of the previous map, +matching the instance `table.setColumnSizing` behavior. ## Type Parameters @@ -42,5 +43,5 @@ The updater follows TanStack Table updater semantics and is routed through the c ## Example ```ts -table_setColumnSizing(table, (old) => old) +table_setColumnSizing(table, (old) => ({ ...old, age: 96 })) ``` diff --git a/docs/reference/static-functions/functions/table_setColumnVisibility.md b/docs/reference/static-functions/functions/table_setColumnVisibility.md index 4de1c5dd6c..a6bb857a80 100644 --- a/docs/reference/static-functions/functions/table_setColumnVisibility.md +++ b/docs/reference/static-functions/functions/table_setColumnVisibility.md @@ -9,11 +9,12 @@ title: table_setColumnVisibility function table_setColumnVisibility(table, updater): void; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:221](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L221) +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:261](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L261) -Updates the table's column visibility state slice. +Routes a column visibility updater through the table's visibility change handler. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +The updater may be a next visibility map or a function of the previous map, +matching the instance `table.setColumnVisibility` behavior. ## Type Parameters @@ -42,5 +43,5 @@ The updater follows TanStack Table updater semantics and is routed through the c ## Example ```ts -table_setColumnVisibility(table, (old) => old) +table_setColumnVisibility(table, (old) => ({ ...old, age: false })) ``` diff --git a/docs/reference/static-functions/functions/table_setGlobalFilter.md b/docs/reference/static-functions/functions/table_setGlobalFilter.md index be3d7dc44f..ace83dc6a5 100644 --- a/docs/reference/static-functions/functions/table_setGlobalFilter.md +++ b/docs/reference/static-functions/functions/table_setGlobalFilter.md @@ -9,11 +9,12 @@ title: table_setGlobalFilter function table_setGlobalFilter(table, updater): void; ``` -Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L84) +Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L89) -Updates the table's global filter state slice. +Routes a global filter updater through the table's global filter handler. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +The updater may be a next value or a function of the previous value, matching +the instance `table.setGlobalFilter` behavior. ## Type Parameters @@ -42,5 +43,5 @@ The updater follows TanStack Table updater semantics and is routed through the c ## Example ```ts -table_setGlobalFilter(table, (old) => old) +table_setGlobalFilter(table, 'search text') ``` diff --git a/docs/reference/static-functions/functions/table_setGrouping.md b/docs/reference/static-functions/functions/table_setGrouping.md index 23e46653fa..ff8e4e52ec 100644 --- a/docs/reference/static-functions/functions/table_setGrouping.md +++ b/docs/reference/static-functions/functions/table_setGrouping.md @@ -9,11 +9,12 @@ title: table_setGrouping function table_setGrouping(table, updater): void; ``` -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:203](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L203) +Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:211](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L211) -Updates the table's grouping state slice. +Routes a grouping updater through the table's grouping change handler. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +The updater may be a next `GroupingState` array or a function of the previous +grouping state, matching the instance `table.setGrouping` behavior. ## Type Parameters @@ -42,5 +43,5 @@ The updater follows TanStack Table updater semantics and is routed through the c ## Example ```ts -table_setGrouping(table, (old) => old) +table_setGrouping(table, (old) => [...old, 'status']) ``` diff --git a/docs/reference/static-functions/functions/table_setOptions.md b/docs/reference/static-functions/functions/table_setOptions.md index cb19c606aa..b06d47683b 100644 --- a/docs/reference/static-functions/functions/table_setOptions.md +++ b/docs/reference/static-functions/functions/table_setOptions.md @@ -9,7 +9,7 @@ title: table_setOptions function table_setOptions(table, updater): void; ``` -Defined in: [core/table/coreTablesFeature.utils.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.utils.ts#L104) +Defined in: [core/table/coreTablesFeature.utils.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.utils.ts#L106) Updates the table options object. diff --git a/docs/reference/static-functions/functions/table_setPageIndex.md b/docs/reference/static-functions/functions/table_setPageIndex.md index 706446d110..29f0287bf4 100644 --- a/docs/reference/static-functions/functions/table_setPageIndex.md +++ b/docs/reference/static-functions/functions/table_setPageIndex.md @@ -9,11 +9,12 @@ title: table_setPageIndex function table_setPageIndex(table, updater): void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L108) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:116](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L116) -Updates the table's page index state slice. +Updates `pagination.pageIndex` and clamps it to the known page range. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +Unknown page counts (`undefined` or `-1`) allow any non-negative page index. +Known page counts clamp the index between `0` and `pageCount - 1`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_setPageSize.md b/docs/reference/static-functions/functions/table_setPageSize.md index 89536e43ff..91508db49c 100644 --- a/docs/reference/static-functions/functions/table_setPageSize.md +++ b/docs/reference/static-functions/functions/table_setPageSize.md @@ -9,11 +9,12 @@ title: table_setPageSize function table_setPageSize(table, updater): void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:188](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L188) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:199](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L199) -Updates the table's page size state slice. +Updates `pagination.pageSize` while preserving the current top row. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +The new size is clamped to at least `1`, and `pageIndex` is recalculated so +the row that was previously at the top of the page remains in view. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_setPagination.md b/docs/reference/static-functions/functions/table_setPagination.md index f00783937f..c9216e6662 100644 --- a/docs/reference/static-functions/functions/table_setPagination.md +++ b/docs/reference/static-functions/functions/table_setPagination.md @@ -9,11 +9,13 @@ title: table_setPagination function table_setPagination(table, updater): void | undefined; ``` -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L60) +Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L65) -Updates the table's pagination state slice. +Routes a pagination updater through the table's pagination change handler. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +The updater may be a next state object or a function of the previous +`PaginationState`; controlled state and external atoms observe the same +updater path as the instance API. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_setSorting.md b/docs/reference/static-functions/functions/table_setSorting.md index 54b192fdf7..a5dca7e97d 100644 --- a/docs/reference/static-functions/functions/table_setSorting.md +++ b/docs/reference/static-functions/functions/table_setSorting.md @@ -9,11 +9,12 @@ title: table_setSorting function table_setSorting(table, updater): void; ``` -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L39) +Defined in: [features/row-sorting/rowSortingFeature.utils.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L41) -Updates the table's sorting state slice. +Routes a sorting updater through the table's sorting change handler. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +The updater may be a next `SortingState` array or a function of the previous +sorting state, matching the instance `table.setSorting` behavior. ## Type Parameters @@ -42,5 +43,5 @@ The updater follows TanStack Table updater semantics and is routed through the c ## Example ```ts -table_setSorting(table, (old) => old) +table_setSorting(table, (old) => [...old, { id: 'age', desc: true }]) ``` diff --git a/docs/reference/static-functions/functions/table_syncExternalStateToBaseAtoms.md b/docs/reference/static-functions/functions/table_syncExternalStateToBaseAtoms.md index 536bdfc675..7191933a18 100644 --- a/docs/reference/static-functions/functions/table_syncExternalStateToBaseAtoms.md +++ b/docs/reference/static-functions/functions/table_syncExternalStateToBaseAtoms.md @@ -39,5 +39,5 @@ derived atoms, stores, and table APIs read a consistent snapshot. ## Example ```ts -const value = table_syncExternalStateToBaseAtoms(table) +table_syncExternalStateToBaseAtoms(table) ``` diff --git a/docs/reference/static-functions/functions/table_toggleAllColumnsVisible.md b/docs/reference/static-functions/functions/table_toggleAllColumnsVisible.md index 94ce6ee48d..7725722248 100644 --- a/docs/reference/static-functions/functions/table_toggleAllColumnsVisible.md +++ b/docs/reference/static-functions/functions/table_toggleAllColumnsVisible.md @@ -9,11 +9,11 @@ title: table_toggleAllColumnsVisible function table_toggleAllColumnsVisible(table, value?): void; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:262](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L262) +Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:303](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L303) -Toggles all columns visible for the table. +Shows or hides every hideable leaf column. -This is the table-level convenience API used by UI controls that affect many columns or rows at once. +Columns that cannot hide stay visible when toggling all columns off. ## Type Parameters diff --git a/docs/reference/static-functions/index.md b/docs/reference/static-functions/index.md index af881e4f54..09889fa93b 100644 --- a/docs/reference/static-functions/index.md +++ b/docs/reference/static-functions/index.md @@ -112,6 +112,7 @@ title: static-functions - [row\_getUniqueValues](functions/row_getUniqueValues.md) - [row\_getValue](functions/row_getValue.md) - [row\_getVisibleCells](functions/row_getVisibleCells.md) +- [row\_getVisibleCellsByColumnId](functions/row_getVisibleCellsByColumnId.md) - [row\_pin](functions/row_pin.md) - [row\_renderValue](functions/row_renderValue.md) - [row\_toggleExpanded](functions/row_toggleExpanded.md) diff --git a/packages/table-core/src/core/cells/coreCellsFeature.utils.ts b/packages/table-core/src/core/cells/coreCellsFeature.utils.ts index 4763e2112c..95731b92f7 100644 --- a/packages/table-core/src/core/cells/coreCellsFeature.utils.ts +++ b/packages/table-core/src/core/cells/coreCellsFeature.utils.ts @@ -3,9 +3,10 @@ import type { TableFeatures } from '../../types/TableFeatures' import type { Cell } from '../../types/Cell' /** - * Returns value for a cell. + * Reads this cell's accessor value from its owning row and column. * - * This is the static implementation behind the matching cell instance API and uses the owning row and column context. + * This is the standalone implementation behind `cell.getValue()`, useful when + * importing static APIs instead of calling methods from the cell prototype. * * @example * ```ts @@ -21,13 +22,14 @@ export function cell_getValue< } /** - * Returns value for a cell. + * Reads the value that should be rendered for this cell. * - * This is the static implementation behind the matching cell instance API and uses the owning row and column context. + * Nullish accessor values are replaced with `table.options.renderFallbackValue`, + * matching the behavior of `cell.renderValue()`. * * @example * ```ts - * const value = cell_renderValue(cell) + * const rendered = cell_renderValue(cell) * ``` */ export function cell_renderValue< @@ -39,13 +41,14 @@ export function cell_renderValue< } /** - * Returns context for a cell. + * Builds the render context passed to a column's `cell` template. * - * This is the static implementation behind the matching cell instance API and uses the owning row and column context. + * The returned object includes stable references to the table, row, column, and + * cell, plus bound `getValue` and `renderValue` helpers for render functions. * * @example * ```ts - * const value = cell_getContext(cell) + * const context = cell_getContext(cell) * ``` */ export function cell_getContext< diff --git a/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts b/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts index 01af59352f..6803f48a86 100644 --- a/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts +++ b/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts @@ -12,13 +12,14 @@ import type { import type { Column } from '../../types/Column' /** - * Returns flat columns for a column. + * Flattens this column and every descendant column into a single array. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * Group columns appear before their child columns, which matches the normalized + * column hierarchy produced during table construction. * * @example * ```ts - * const value = column_getFlatColumns(column) + * const flatColumns = column_getFlatColumns(column) * ``` */ export function column_getFlatColumns< @@ -32,13 +33,14 @@ export function column_getFlatColumns< } /** - * Returns leaf columns for a column. + * Collects the terminal leaf columns below this column. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * Group columns return their ordered descendants. Non-group columns return an + * array containing only the column itself. * * @example * ```ts - * const value = column_getLeafColumns(column) + * const leafColumns = column_getLeafColumns(column) * ``` */ export function column_getLeafColumns< @@ -64,13 +66,15 @@ export function column_getLeafColumns< } /** - * Returns default column def for the table. + * Merges built-in, feature, and user default column definitions. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Built-in defaults provide a header and fallback cell renderer, feature + * defaults can add feature-specific column options, and + * `options.defaultColumn` wins last. * * @example * ```ts - * const value = table_getDefaultColumnDef(table) + * const defaultColumn = table_getDefaultColumnDef(table) * ``` */ export function table_getDefaultColumnDef< @@ -103,13 +107,14 @@ export function table_getDefaultColumnDef< } /** - * Returns all columns for the table. + * Normalizes `options.columns` into the table's nested column tree. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Each column definition is constructed with its parent and depth, and group + * column children are recursively constructed. * * @example * ```ts - * const value = table_getAllColumns(table) + * const columns = table_getAllColumns(table) * ``` */ export function table_getAllColumns< @@ -144,13 +149,14 @@ export function table_getAllColumns< } /** - * Returns all flat columns for the table. + * Flattens every table column, including group columns and leaf columns. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Use this when parent/group columns must be included in addition to data leaf + * columns. * * @example * ```ts - * const value = table_getAllFlatColumns(table) + * const flatColumns = table_getAllFlatColumns(table) * ``` */ export function table_getAllFlatColumns< @@ -163,13 +169,14 @@ export function table_getAllFlatColumns< } /** - * Returns all flat columns by id for the table. + * Builds an id lookup for every flat column in the table. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Group columns and leaf columns are included. Later columns with the same id + * replace earlier entries. * * @example * ```ts - * const value = table_getAllFlatColumnsById(table) + * const columnsById = table_getAllFlatColumnsById(table) * ``` */ export function table_getAllFlatColumnsById< @@ -188,13 +195,14 @@ export function table_getAllFlatColumnsById< } /** - * Returns all leaf columns for the table. + * Collects all terminal leaf columns in their current table order. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Column ordering features can reorder the collected leaves before the result + * is returned. * * @example * ```ts - * const value = table_getAllLeafColumns(table) + * const leafColumns = table_getAllLeafColumns(table) * ``` */ export function table_getAllLeafColumns< @@ -214,13 +222,14 @@ export function table_getAllLeafColumns< } /** - * Returns all leaf columns by id for the table. + * Builds an id lookup for terminal leaf columns only. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Parent/group columns are excluded, making this lookup appropriate for row + * cells and feature state keyed by data columns. * * @example * ```ts - * const value = table_getAllLeafColumnsById(table) + * const leavesById = table_getAllLeafColumnsById(table) * ``` */ export function table_getAllLeafColumnsById< @@ -239,13 +248,14 @@ export function table_getAllLeafColumnsById< } /** - * Returns column for the table. + * Looks up a column by id from the flat column map. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The lookup can return group columns or leaf columns. In development, a + * missing id logs a warning to help catch stale column references. * * @example * ```ts - * const value = table_getColumn(table) + * const column = table_getColumn(table, 'firstName') * ``` */ export function table_getColumn< diff --git a/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts b/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts index fd418b5588..ff1ea28f99 100644 --- a/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts +++ b/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts @@ -13,13 +13,14 @@ import type { Header_Header } from './coreHeadersFeature.types' import type { Column } from '../../types/Column' /** - * Returns leaf headers for a header. + * Walks a header tree and collects all descendant leaf headers. * - * This is the static implementation behind the matching header instance API and can account for nested header groups. + * The header itself is included after its descendants, matching the recursive + * shape used by nested header groups. * * @example * ```ts - * const value = header_getLeafHeaders(header) + * const leafHeaders = header_getLeafHeaders(header) * ``` */ export function header_getLeafHeaders< @@ -42,13 +43,13 @@ export function header_getLeafHeaders< } /** - * Returns context for a header. + * Builds the render context passed to a column's `header` or `footer` template. * - * This is the static implementation behind the matching header instance API and can account for nested header groups. + * The context contains the header, its column, and the owning table instance. * * @example * ```ts - * const value = header_getContext(header) + * const context = header_getContext(header) * ``` */ export function header_getContext< @@ -64,13 +65,14 @@ export function header_getContext< } /** - * Returns header groups for the table. + * Builds visible header groups for the current column tree. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Column visibility and pinning are applied before groups are built. When no + * columns are pinned, the fast path skips pin partitioning. * * @example * ```ts - * const value = table_getHeaderGroups(table) + * const headerGroups = table_getHeaderGroups(table) * ``` */ export function table_getHeaderGroups< @@ -127,13 +129,14 @@ export function table_getHeaderGroups< } /** - * Returns footer groups for the table. + * Builds footer groups by reversing the current header groups. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Footer rendering uses the same header objects and grouping structure, but + * renders them from leaf level back toward the root. * * @example * ```ts - * const value = table_getFooterGroups(table) + * const footerGroups = table_getFooterGroups(table) * ``` */ export function table_getFooterGroups< @@ -145,13 +148,14 @@ export function table_getFooterGroups< } /** - * Returns flat headers for the table. + * Flattens every header from every header group into one array. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The result includes parent headers and placeholder headers, in header-group + * order from top to bottom. * * @example * ```ts - * const value = table_getFlatHeaders(table) + * const flatHeaders = table_getFlatHeaders(table) * ``` */ export function table_getFlatHeaders< @@ -170,13 +174,14 @@ export function table_getFlatHeaders< } /** - * Returns leaf headers for the table. + * Collects only the leaf headers from the current header tree. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Parent/group headers are skipped, making the result suitable for rendering + * one header per visible leaf column. * * @example * ```ts - * const value = table_getLeafHeaders(table) + * const leafHeaders = table_getLeafHeaders(table) * ``` */ export function table_getLeafHeaders< diff --git a/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts b/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts index ab40f22505..372ca42c46 100644 --- a/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts +++ b/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts @@ -5,13 +5,14 @@ import type { RowData } from '../../types/type-utils' import type { RowModel } from './coreRowModelsFeature.types' /** - * Returns core row model for the table. + * Resolves the table's unmodified core row model. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The factory is created once per table, either from `options._rowModels.coreRowModel` + * or the built-in `createCoreRowModel()`, then reused for later calls. * * @example * ```ts - * const value = table_getCoreRowModel(table) + * const coreRows = table_getCoreRowModel(table) * ``` */ export function table_getCoreRowModel< @@ -28,13 +29,14 @@ export function table_getCoreRowModel< } /** - * Returns pre filtered row model for the table. + * Reads the row model immediately before column/global filtering. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Filtering is the first derived row-model stage, so this currently aliases + * `table.getCoreRowModel()`. * * @example * ```ts - * const value = table_getPreFilteredRowModel(table) + * const rowsBeforeFiltering = table_getPreFilteredRowModel(table) * ``` */ export function table_getPreFilteredRowModel< @@ -45,13 +47,15 @@ export function table_getPreFilteredRowModel< } /** - * Returns filtered row model for the table. + * Resolves the row model after column and global filtering. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * When `manualFiltering` is enabled, or no filtered row-model factory was + * registered, this returns the pre-filtered row model because filtering is + * expected to happen outside the table. * * @example * ```ts - * const value = table_getFilteredRowModel(table) + * const filteredRows = table_getFilteredRowModel(table) * ``` */ export function table_getFilteredRowModel< @@ -71,13 +75,13 @@ export function table_getFilteredRowModel< } /** - * Returns pre grouped row model for the table. + * Reads the row model immediately before grouping. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Grouping runs after filtering, so this aliases `table.getFilteredRowModel()`. * * @example * ```ts - * const value = table_getPreGroupedRowModel(table) + * const rowsBeforeGrouping = table_getPreGroupedRowModel(table) * ``` */ export function table_getPreGroupedRowModel< @@ -88,13 +92,14 @@ export function table_getPreGroupedRowModel< } /** - * Returns grouped row model for the table. + * Resolves the row model after grouping has produced grouped and aggregated rows. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * When `manualGrouping` is enabled, or no grouped row-model factory was + * registered, this returns the pre-grouped row model unchanged. * * @example * ```ts - * const value = table_getGroupedRowModel(table) + * const groupedRows = table_getGroupedRowModel(table) * ``` */ export function table_getGroupedRowModel< @@ -114,13 +119,13 @@ export function table_getGroupedRowModel< } /** - * Returns pre sorted row model for the table. + * Reads the row model immediately before sorting. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Sorting runs after grouping, so this aliases `table.getGroupedRowModel()`. * * @example * ```ts - * const value = table_getPreSortedRowModel(table) + * const rowsBeforeSorting = table_getPreSortedRowModel(table) * ``` */ export function table_getPreSortedRowModel< @@ -131,13 +136,15 @@ export function table_getPreSortedRowModel< } /** - * Returns sorted row model for the table. + * Resolves the row model after sorting has been applied. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * When `manualSorting` is enabled, or no sorted row-model factory was + * registered, this returns the pre-sorted row model because sorted data is + * expected to be supplied by the caller. * * @example * ```ts - * const value = table_getSortedRowModel(table) + * const sortedRows = table_getSortedRowModel(table) * ``` */ export function table_getSortedRowModel< @@ -157,13 +164,13 @@ export function table_getSortedRowModel< } /** - * Returns pre expanded row model for the table. + * Reads the row model immediately before row expansion. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Expansion runs after sorting, so this aliases `table.getSortedRowModel()`. * * @example * ```ts - * const value = table_getPreExpandedRowModel(table) + * const rowsBeforeExpansion = table_getPreExpandedRowModel(table) * ``` */ export function table_getPreExpandedRowModel< @@ -174,13 +181,14 @@ export function table_getPreExpandedRowModel< } /** - * Returns expanded row model for the table. + * Resolves the row model after expanded rows have been flattened into view. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * When `manualExpanding` is enabled, or no expanded row-model factory was + * registered, this returns the pre-expanded row model unchanged. * * @example * ```ts - * const value = table_getExpandedRowModel(table) + * const expandedRows = table_getExpandedRowModel(table) * ``` */ export function table_getExpandedRowModel< @@ -200,13 +208,14 @@ export function table_getExpandedRowModel< } /** - * Returns pre paginated row model for the table. + * Reads the row model immediately before pagination. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Pagination is the final built-in row-model stage, so this aliases + * `table.getExpandedRowModel()`. * * @example * ```ts - * const value = table_getPrePaginatedRowModel(table) + * const rowsBeforePagination = table_getPrePaginatedRowModel(table) * ``` */ export function table_getPrePaginatedRowModel< @@ -217,13 +226,15 @@ export function table_getPrePaginatedRowModel< } /** - * Returns paginated row model for the table. + * Resolves the row model after pagination has sliced rows for the current page. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * When `manualPagination` is enabled, or no paginated row-model factory was + * registered, this returns the pre-paginated row model because pagination is + * expected to happen before data reaches the table. * * @example * ```ts - * const value = table_getPaginatedRowModel(table) + * const pageRows = table_getPaginatedRowModel(table) * ``` */ export function table_getPaginatedRowModel< @@ -243,13 +254,14 @@ export function table_getPaginatedRowModel< } /** - * Returns row model for the table. + * Resolves the final row model consumed by renderers. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * This is the end of the built-in row-model pipeline: core -> filtering -> + * grouping -> sorting -> expanding -> pagination. * * @example * ```ts - * const value = table_getRowModel(table) + * const visibleRows = table_getRowModel(table) * ``` */ export function table_getRowModel< diff --git a/packages/table-core/src/core/rows/coreRowsFeature.utils.ts b/packages/table-core/src/core/rows/coreRowsFeature.utils.ts index ccec269bcc..ce568a28a1 100644 --- a/packages/table-core/src/core/rows/coreRowsFeature.utils.ts +++ b/packages/table-core/src/core/rows/coreRowsFeature.utils.ts @@ -7,13 +7,14 @@ import type { Row } from '../../types/Row' import type { Cell } from '../../types/Cell' /** - * Returns value for a row. + * Reads and caches this row's value for a column. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * The value is produced by the column accessor. Missing columns or display + * columns without an accessor return `undefined`. * * @example * ```ts - * const value = row_getValue(row) + * const firstName = row_getValue(row, 'firstName') * ``` */ export function row_getValue< @@ -36,13 +37,14 @@ export function row_getValue< } /** - * Returns unique values for a row. + * Reads and caches the values used by faceting/grouping for a column. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * If the column defines `getUniqueValues`, that result is used. Otherwise the + * row's accessor value is wrapped in a single-item array. * * @example * ```ts - * const value = row_getUniqueValues(row) + * const values = row_getUniqueValues(row, 'tags') * ``` */ export function row_getUniqueValues< @@ -80,7 +82,7 @@ export function row_getUniqueValues< * * @example * ```ts - * const value = row_renderValue(row) + * const value = row_renderValue(row, 'firstName') * ``` */ export function row_renderValue< @@ -91,13 +93,13 @@ export function row_renderValue< } /** - * Returns leaf rows for a row. + * Flattens this row's descendant tree into leaf rows. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * The row itself is not included; only nested `subRows` are walked. * * @example * ```ts - * const value = row_getLeafRows(row) + * const descendants = row_getLeafRows(row) * ``` */ export function row_getLeafRows< @@ -108,13 +110,14 @@ export function row_getLeafRows< } /** - * Returns parent row for a row. + * Looks up this row's direct parent, if it has one. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * Parent lookup searches the pre-pagination row model so parent relationships + * are available even when the parent is not on the current page. * * @example * ```ts - * const value = row_getParentRow(row) + * const parent = row_getParentRow(row) * ``` */ export function row_getParentRow< @@ -125,13 +128,13 @@ export function row_getParentRow< } /** - * Returns parent rows for a row. + * Collects this row's ancestor chain from root to direct parent. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * The current row is not included. Rows without a parent return an empty array. * * @example * ```ts - * const value = row_getParentRows(row) + * const ancestors = row_getParentRows(row) * ``` */ export function row_getParentRows< @@ -151,13 +154,14 @@ export function row_getParentRows< } /** - * Returns all cells for a row. + * Constructs one cell for each leaf column in this row. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * The result follows `table.getAllLeafColumns()` order and includes hidden + * columns; visibility-specific APIs filter this list later. * * @example * ```ts - * const value = row_getAllCells(row) + * const cells = row_getAllCells(row) * ``` */ export function row_getAllCells< @@ -175,13 +179,13 @@ export function row_getAllCells< } /** - * Returns all cells by column id for a row. + * Builds a lookup map of this row's cells keyed by column id. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * This is the static implementation behind `row.getAllCellsByColumnId()`. * * @example * ```ts - * const value = row_getAllCellsByColumnId(row) + * const cellsById = row_getAllCellsByColumnId(row) * ``` */ export function row_getAllCellsByColumnId< @@ -198,13 +202,14 @@ export function row_getAllCellsByColumnId< } /** - * Returns row id for the table. + * Resolves the stable id for a row. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * `options.getRowId` wins when provided. Otherwise root rows use their index + * and child rows append their index to the parent id, such as `0.2`. * * @example * ```ts - * const value = table_getRowId(table) + * const id = table_getRowId(originalRow, table, index, parentRow) * ``` */ export function table_getRowId< @@ -223,13 +228,14 @@ export function table_getRowId< } /** - * Returns row for the table. + * Looks up a row by id from the current or full row model. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * By default this searches `table.getRowModel()`. Passing `searchAll` searches + * the pre-pagination model first, then falls back to the core model. * * @example * ```ts - * const value = table_getRow(table) + * const row = table_getRow(table, rowId, true) * ``` */ export function table_getRow< diff --git a/packages/table-core/src/core/table/coreTablesFeature.utils.ts b/packages/table-core/src/core/table/coreTablesFeature.utils.ts index de481a7531..beabe6c369 100644 --- a/packages/table-core/src/core/table/coreTablesFeature.utils.ts +++ b/packages/table-core/src/core/table/coreTablesFeature.utils.ts @@ -12,7 +12,7 @@ import type { TableOptions } from '../../types/TableOptions' * * @example * ```ts - * const value = table_syncExternalStateToBaseAtoms(table) + * table_syncExternalStateToBaseAtoms(table) * ``` */ export function table_syncExternalStateToBaseAtoms< @@ -72,7 +72,7 @@ export function table_reset< * * @example * ```ts - * const value = table_mergeOptions(table) + * const options = table_mergeOptions(table, nextOptions) * ``` */ export function table_mergeOptions< diff --git a/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts b/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts index 306bdc5a73..dd65e2dcab 100644 --- a/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts +++ b/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts @@ -5,13 +5,14 @@ import type { Table_Internal } from '../../types/Table' import type { Column_Internal } from '../../types/Column' /** - * Returns faceted min max values for a column. + * Computes min and max numeric facet values for one column. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * The configured `facetedMinMaxValues` row-model factory owns the calculation. + * If no factory is registered, the result is `undefined`. * * @example * ```ts - * const value = column_getFacetedMinMaxValues(column) + * const range = column_getFacetedMinMaxValues(column, table) * ``` */ export function column_getFacetedMinMaxValues< @@ -29,13 +30,15 @@ export function column_getFacetedMinMaxValues< } /** - * Returns faceted row model for a column. + * Computes the row model used to derive one column's facet values. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * The faceted row model normally applies every other active filter while + * excluding this column's own filter. If no factory is registered, the + * pre-filtered row model is returned. * * @example * ```ts - * const value = column_getFacetedRowModel(column) + * const rows = column_getFacetedRowModel(column, table) * ``` */ export function column_getFacetedRowModel< @@ -53,13 +56,14 @@ export function column_getFacetedRowModel< } /** - * Returns faceted unique values for a column. + * Computes unique facet values and their occurrence counts for one column. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * The configured `facetedUniqueValues` row-model factory owns the calculation. + * If no factory is registered, an empty `Map` is returned. * * @example * ```ts - * const value = column_getFacetedUniqueValues(column) + * const values = column_getFacetedUniqueValues(column, table) * ``` */ export function column_getFacetedUniqueValues< @@ -77,13 +81,14 @@ export function column_getFacetedUniqueValues< } /** - * Returns global faceted min max values for the table. + * Computes min and max numeric facet values for the global filter context. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The global context is requested with the internal `__global__` column id. If + * no factory is registered, the result is `undefined`. * * @example * ```ts - * const value = table_getGlobalFacetedMinMaxValues(table) + * const range = table_getGlobalFacetedMinMaxValues(table) * ``` */ export function table_getGlobalFacetedMinMaxValues< @@ -97,13 +102,15 @@ export function table_getGlobalFacetedMinMaxValues< } /** - * Returns global faceted row model for the table. + * Computes the row model used to derive global facet values. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The global context is requested with the internal `__global__` column id. If + * no faceted row-model factory is registered, the pre-filtered row model is + * returned. * * @example * ```ts - * const value = table_getGlobalFacetedRowModel(table) + * const rows = table_getGlobalFacetedRowModel(table) * ``` */ export function table_getGlobalFacetedRowModel< @@ -117,13 +124,14 @@ export function table_getGlobalFacetedRowModel< } /** - * Returns global faceted unique values for the table. + * Computes unique values and occurrence counts for the global filter context. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The global context is requested with the internal `__global__` column id. If + * no factory is registered, an empty `Map` is returned. * * @example * ```ts - * const value = table_getGlobalFacetedUniqueValues(table) + * const values = table_getGlobalFacetedUniqueValues(table) * ``` */ export function table_getGlobalFacetedUniqueValues< diff --git a/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts b/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts index 766ca00ac8..f7bedd7d91 100644 --- a/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts +++ b/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts @@ -9,13 +9,14 @@ import type { } from './columnFilteringFeature.types' /** - * Returns the default column filters state. + * Creates the default column filter state. * - * Feature constructors use this value to initialize the table state or option defaults when no user value is provided. + * The feature default is an empty array, meaning no column filters are active. + * Reset APIs use this value when `defaultState` is `true`. * * @example * ```ts - * const initialValue = getDefaultColumnFiltersState() + * const filters = getDefaultColumnFiltersState() * ``` */ export function getDefaultColumnFiltersState(): ColumnFiltersState { @@ -23,13 +24,15 @@ export function getDefaultColumnFiltersState(): ColumnFiltersState { } /** - * Infers filter fn for a column. + * Chooses a built-in filter function from the column's first core row value. * - * The inference uses the column definition, table options, and sampled row values when needed. + * Strings use `includesString`, numbers use `inNumberRange`, booleans and + * objects use `equals`, arrays use `arrIncludes`, and unknown values fall back + * to `weakEquals`. * * @example * ```ts - * const value = column_getAutoFilterFn(column) + * const filterFn = column_getAutoFilterFn(column) * ``` */ export function column_getAutoFilterFn< @@ -68,13 +71,15 @@ export function column_getAutoFilterFn< } /** - * Returns filter fn for a column. + * Resolves the filter function configured for a column. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * Function-valued `columnDef.filterFn` is returned directly, `'auto'` delegates + * to `column_getAutoFilterFn`, and string values are looked up in the table's + * filter function registry. * * @example * ```ts - * const value = column_getFilterFn(column) + * const filterFn = column_getFilterFn(column) * ``` */ export function column_getFilterFn< @@ -103,13 +108,14 @@ export function column_getFilterFn< } /** - * Returns whether a column can use filter. + * Checks whether column filtering is enabled for this accessor column. * - * This combines column options, table options, and any required accessor or feature state for the capability. + * The column must have an accessor and filtering must be enabled by the column + * definition, `enableColumnFilters`, and the table-wide `enableFilters` option. * * @example * ```ts - * const value = column_getCanFilter(column) + * const canFilter = column_getCanFilter(column) * ``` */ export function column_getCanFilter< @@ -126,13 +132,14 @@ export function column_getCanFilter< } /** - * Returns is filtered for a column. + * Checks whether this column currently has an entry in `state.columnFilters`. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * This only reflects filter state presence; it does not indicate whether the + * filter removes any rows. * * @example * ```ts - * const value = column_getIsFiltered(column) + * const isFiltered = column_getIsFiltered(column) * ``` */ export function column_getIsFiltered< @@ -144,9 +151,9 @@ export function column_getIsFiltered< } /** - * Returns filter value for a column. + * Reads this column's current filter value from `state.columnFilters`. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * Missing filter entries return `undefined`. * * @example * ```ts @@ -164,13 +171,13 @@ export function column_getFilterValue< } /** - * Returns filter index for a column. + * Finds this column's position in the ordered `state.columnFilters` array. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * The result is `-1` when the column has no active filter. * * @example * ```ts - * const value = column_getFilterIndex(column) + * const index = column_getFilterIndex(column) * ``` */ export function column_getFilterIndex< @@ -186,13 +193,14 @@ export function column_getFilterIndex< } /** - * Updates filter value for a column. + * Adds, updates, or removes this column's filter value. * - * This delegates to the owning table state updater so external state, external atoms, and internal state stay synchronized. + * The incoming value may be an updater. After resolution, `autoRemove` rules + * decide whether the filter should be removed instead of stored. * * @example * ```ts - * column_setFilterValue(column, (old) => old) + * column_setFilterValue(column, (old) => String(old ?? '').trim()) * ``` */ export function column_setFilterValue< @@ -233,13 +241,15 @@ export function column_setFilterValue< } /** - * Updates the table's column filters state slice. + * Routes a column filter updater through the table's filter change handler. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * The resolved filters are cleaned before they are emitted: filters for known + * columns are removed when their filter function says the value should be + * auto-removed. * * @example * ```ts - * table_setColumnFilters(table, (old) => old) + * table_setColumnFilters(table, (old) => old.filter((filter) => filter.id !== 'age')) * ``` */ export function table_setColumnFilters< @@ -271,9 +281,10 @@ export function table_setColumnFilters< } /** - * Resets the table's column filters state slice. + * Resets `columnFilters` to the configured initial state or feature default. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset clones `table.initialState.columnFilters` when it + * exists. Passing `true` ignores initial state and resets to `[]`. * * @example * ```ts diff --git a/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts b/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts index e325a7fe71..1ed831710d 100644 --- a/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts +++ b/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts @@ -13,13 +13,14 @@ import type { } from './columnGroupingFeature.types' /** - * Returns the default grouping state. + * Creates the default grouping state. * - * Feature constructors use this value to initialize the table state or option defaults when no user value is provided. + * The feature default is an empty array, meaning no columns are grouped. Reset + * APIs use this value when `defaultState` is `true`. * * @example * ```ts - * const initialValue = getDefaultGroupingState() + * const grouping = getDefaultGroupingState() * ``` */ export function getDefaultGroupingState(): GroupingState { @@ -27,9 +28,10 @@ export function getDefaultGroupingState(): GroupingState { } /** - * Toggles grouping for a column. + * Adds or removes this column id from the grouping state. * - * The update is applied through the owning table state slice and respects the feature options for that column. + * Existing grouped columns keep their order. A column already present in + * `state.grouping` is removed; otherwise it is appended. * * @example * ```ts @@ -52,13 +54,14 @@ export function column_toggleGrouping< } /** - * Returns whether a column can use group. + * Checks whether this column can be used for grouping. * - * This combines column options, table options, and any required accessor or feature state for the capability. + * Grouping must be enabled at the column and table level, and the column must + * either have an accessor or provide `getGroupingValue`. * * @example * ```ts - * const value = column_getCanGroup(column) + * const canGroup = column_getCanGroup(column) * ``` */ export function column_getCanGroup< @@ -74,13 +77,14 @@ export function column_getCanGroup< } /** - * Returns is grouped for a column. + * Checks whether this column id is present in `state.grouping`. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * The result only reflects grouping state, not whether the grouped row model has + * been calculated yet. * * @example * ```ts - * const value = column_getIsGrouped(column) + * const isGrouped = column_getIsGrouped(column) * ``` */ export function column_getIsGrouped< @@ -92,13 +96,13 @@ export function column_getIsGrouped< } /** - * Returns grouped index for a column. + * Finds this column's position in the ordered grouping state. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * The result is `-1` when the column is not grouped. * * @example * ```ts - * const value = column_getGroupedIndex(column) + * const index = column_getGroupedIndex(column) * ``` */ export function column_getGroupedIndex< @@ -110,13 +114,13 @@ export function column_getGroupedIndex< } /** - * Returns an event handler for toggling grouping handler. + * Creates a header/control handler that toggles grouping for this column. * - * The handler is intended for direct use in column header controls such as buttons or checkboxes. + * The handler is a no-op when `column_getCanGroup(column)` is false. * * @example * ```ts - * const value = column_getToggleGroupingHandler(column) + * const onClick = column_getToggleGroupingHandler(column) * ``` */ export function column_getToggleGroupingHandler< @@ -133,13 +137,14 @@ export function column_getToggleGroupingHandler< } /** - * Infers aggregation fn for a column. + * Chooses a built-in aggregation function from the first core row value. * - * The inference uses the column definition, table options, and sampled row values when needed. + * Numeric columns default to `sum`, date-like values default to `extent`, and + * other value types leave aggregation unspecified. * * @example * ```ts - * const value = column_getAutoAggregationFn(column) + * const aggregationFn = column_getAutoAggregationFn(column) * ``` */ export function column_getAutoAggregationFn< @@ -165,13 +170,15 @@ export function column_getAutoAggregationFn< } /** - * Returns aggregation fn for a column. + * Resolves the aggregation function configured for a column. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * Function-valued `columnDef.aggregationFn` is returned directly, `'auto'` + * delegates to `column_getAutoAggregationFn`, and string values are looked up in + * the table's aggregation function registry. * * @example * ```ts - * const value = column_getAggregationFn(column) + * const aggregationFn = column_getAggregationFn(column) * ``` */ export function column_getAggregationFn< @@ -191,13 +198,14 @@ export function column_getAggregationFn< } /** - * Updates the table's grouping state slice. + * Routes a grouping updater through the table's grouping change handler. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * The updater may be a next `GroupingState` array or a function of the previous + * grouping state, matching the instance `table.setGrouping` behavior. * * @example * ```ts - * table_setGrouping(table, (old) => old) + * table_setGrouping(table, (old) => [...old, 'status']) * ``` */ export function table_setGrouping< @@ -208,9 +216,10 @@ export function table_setGrouping< } /** - * Resets the table's grouping state slice. + * Resets `grouping` to the configured initial state or feature default. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset clones `table.initialState.grouping` when it + * exists. Passing `true` ignores initial state and resets to `[]`. * * @example * ```ts @@ -229,13 +238,13 @@ export function table_resetGrouping< } /** - * Returns is grouped for a row. + * Checks whether this row was created as a grouped row. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * Grouped rows carry a `groupingColumnId`; ordinary leaf rows do not. * * @example * ```ts - * const value = row_getIsGrouped(row) + * const isGrouped = row_getIsGrouped(row) * ``` */ export function row_getIsGrouped< @@ -246,13 +255,14 @@ export function row_getIsGrouped< } /** - * Returns grouping value for a row. + * Reads and caches this row's grouping value for a column. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * `columnDef.getGroupingValue` wins when provided; otherwise the normal row + * accessor value is used. * * @example * ```ts - * const value = row_getGroupingValue(row) + * const groupValue = row_getGroupingValue(row, 'status') * ``` */ export function row_getGroupingValue< @@ -282,13 +292,13 @@ export function row_getGroupingValue< } /** - * Returns is grouped for a cell. + * Checks whether this cell represents the grouped column for a grouped row. * - * This is the static implementation behind the matching cell instance API and uses the owning row and column context. + * This is the cell that usually renders the grouped value and expansion control. * * @example * ```ts - * const value = cell_getIsGrouped(cell) + * const isGroupedCell = cell_getIsGrouped(cell) * ``` */ export function cell_getIsGrouped< @@ -303,13 +313,14 @@ export function cell_getIsGrouped< } /** - * Returns is placeholder for a cell. + * Checks whether this cell is a placeholder hidden by grouping. * - * This is the static implementation behind the matching cell instance API and uses the owning row and column context. + * Placeholder cells belong to grouped columns other than the row's active + * grouping column. * * @example * ```ts - * const value = cell_getIsPlaceholder(cell) + * const isPlaceholder = cell_getIsPlaceholder(cell) * ``` */ export function cell_getIsPlaceholder< @@ -321,13 +332,14 @@ export function cell_getIsPlaceholder< } /** - * Returns is aggregated for a cell. + * Checks whether this cell should render an aggregated value. * - * This is the static implementation behind the matching cell instance API and uses the owning row and column context. + * Aggregated cells are non-placeholder, non-grouped cells on rows that have + * subRows. * * @example * ```ts - * const value = cell_getIsAggregated(cell) + * const isAggregated = cell_getIsAggregated(cell) * ``` */ export function cell_getIsAggregated< diff --git a/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts b/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts index d019d25ac0..49a2654aef 100644 --- a/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts +++ b/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts @@ -9,13 +9,14 @@ import type { ColumnPinningPosition } from '../column-pinning/columnPinningFeatu import type { ColumnOrderState } from './columnOrderingFeature.types' /** - * Returns the default column order state. + * Creates the default column order state. * - * Feature constructors use this value to initialize the table state or option defaults when no user value is provided. + * The feature default is an empty array, meaning leaf columns keep their natural + * definition order. Reset APIs use this value when `defaultState` is `true`. * * @example * ```ts - * const initialValue = getDefaultColumnOrderState() + * const order = getDefaultColumnOrderState() * ``` */ export function getDefaultColumnOrderState(): ColumnOrderState { @@ -23,13 +24,14 @@ export function getDefaultColumnOrderState(): ColumnOrderState { } /** - * Returns index for a column. + * Finds this column's index within a visible pinning region. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * Pass `'left'`, `'center'`, or `'right'` to search that region; omit the + * position to search the full visible leaf column list. * * @example * ```ts - * const value = column_getIndex(column) + * const index = column_getIndex(column, 'center') * ``` */ export function column_getIndex< @@ -45,13 +47,13 @@ export function column_getIndex< } /** - * Returns is first column for a column. + * Checks whether this column is the first visible column in a pinning region. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * The same `position` semantics as `column_getIndex` apply. * * @example * ```ts - * const value = column_getIsFirstColumn(column) + * const isFirst = column_getIsFirstColumn(column, 'left') * ``` */ export function column_getIsFirstColumn< @@ -67,13 +69,13 @@ export function column_getIsFirstColumn< } /** - * Returns is last column for a column. + * Checks whether this column is the last visible column in a pinning region. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * The same `position` semantics as `column_getIndex` apply. * * @example * ```ts - * const value = column_getIsLastColumn(column) + * const isLast = column_getIsLastColumn(column, 'right') * ``` */ export function column_getIsLastColumn< @@ -89,13 +91,14 @@ export function column_getIsLastColumn< } /** - * Updates the table's column order state slice. + * Routes a column order updater through the table's column-order change handler. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * The updater may be a next ordered id array or a function of the previous + * array, matching the instance `table.setColumnOrder` behavior. * * @example * ```ts - * table_setColumnOrder(table, (old) => old) + * table_setColumnOrder(table, ['firstName', 'lastName', 'age']) * ``` */ export function table_setColumnOrder< @@ -106,9 +109,10 @@ export function table_setColumnOrder< } /** - * Resets the table's column order state slice. + * Resets `columnOrder` to the configured initial state or feature default. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset clones `table.initialState.columnOrder` when it + * exists. Passing `true` ignores initial state and resets to `[]`. * * @example * ```ts @@ -127,13 +131,14 @@ export function table_resetColumnOrder< } /** - * Returns order columns fn for the table. + * Creates the ordering function used to arrange leaf columns. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The returned function applies `state.columnOrder`, preserves unspecified + * columns in their original order, then delegates to grouping rules. * * @example * ```ts - * const value = table_getOrderColumnsFn(table) + * const orderColumnsForTable = table_getOrderColumnsFn(table) * ``` */ export function table_getOrderColumnsFn< @@ -184,13 +189,15 @@ export function table_getOrderColumnsFn< } /** - * Orders leaf columns with manual ordering, grouping, and pinning rules. + * Applies grouped-column placement rules to an already ordered leaf-column list. * - * This helper is used by the column ordering feature to produce the final visible column order. + * `groupedColumnMode: 'remove'` drops grouped columns from the list. + * `groupedColumnMode: 'reorder'` moves grouped columns to the front in grouping + * state order. * * @example * ```ts - * const orderedColumns = orderColumns(leafColumns, columnOrder, grouping, groupedColumnMode) + * const orderedColumns = orderColumns(table, leafColumns) * ``` */ export function orderColumns< diff --git a/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts b/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts index f43ed16ce2..7700a01832 100644 --- a/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts +++ b/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts @@ -22,13 +22,14 @@ import type { // State /** - * Returns the default column pinning state. + * Creates the default column pinning state. * - * Feature constructors use this value to initialize the table state or option defaults when no user value is provided. + * Both pinning regions start empty. Reset APIs use this value when + * `defaultState` is `true`. * * @example * ```ts - * const initialValue = getDefaultColumnPinningState() + * const pinning = getDefaultColumnPinningState() * ``` */ export function getDefaultColumnPinningState(): ColumnPinningState { @@ -41,9 +42,11 @@ export function getDefaultColumnPinningState(): ColumnPinningState { // Column APIs /** - * Pin. for a column. + * Moves this column's leaf column ids into a pinning region. * - * This is the static implementation behind the matching column instance API. + * Pinning a group column pins all of its leaves. The leaf ids are first removed + * from both regions, then appended to the requested `'left'` or `'right'` + * region. Passing `false` unpins them back to the center. * * @example * ```ts @@ -92,13 +95,14 @@ export function column_pin< } /** - * Returns whether a column can use pin. + * Checks whether this column or any of its leaf columns can be pinned. * - * This combines column options, table options, and any required accessor or feature state for the capability. + * Column-level `enablePinning` and table `enableColumnPinning` both default to + * `true`; at least one leaf column must allow pinning. * * @example * ```ts - * const value = column_getCanPin(column) + * const canPin = column_getCanPin(column) * ``` */ export function column_getCanPin< @@ -118,13 +122,14 @@ export function column_getCanPin< } /** - * Returns is pinned for a column. + * Reads this column's current pinning region. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * Group columns report `'left'` or `'right'` when any leaf column is pinned in + * that region. Unpinned columns return `false`. * * @example * ```ts - * const value = column_getIsPinned(column) + * const position = column_getIsPinned(column) * ``` */ export function column_getIsPinned< @@ -146,13 +151,14 @@ export function column_getIsPinned< } /** - * Returns pinned index for a column. + * Finds this column's index within its pinned region. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * Unpinned columns return `0`; pinned columns return their position in + * `state.columnPinning.left` or `state.columnPinning.right`. * * @example * ```ts - * const value = column_getPinnedIndex(column) + * const index = column_getPinnedIndex(column) * ``` */ export function column_getPinnedIndex< @@ -171,13 +177,13 @@ export function column_getPinnedIndex< // Row APIs /** - * Returns center visible cells for a row. + * Collects visible cells whose columns are not pinned left or right. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * The result preserves the row's visible-cell order for center columns. * * @example * ```ts - * const value = row_getCenterVisibleCells(row) + * const centerCells = row_getCenterVisibleCells(row) * ``` */ export function row_getCenterVisibleCells< @@ -196,13 +202,14 @@ export function row_getCenterVisibleCells< } /** - * Returns left visible cells for a row. + * Collects visible cells for columns pinned to the left region. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * Cells are returned in `state.columnPinning.left` order and are marked with + * `cell.position = 'left'`. * * @example * ```ts - * const value = row_getLeftVisibleCells(row) + * const leftCells = row_getLeftVisibleCells(row) * ``` */ export function row_getLeftVisibleCells< @@ -231,13 +238,14 @@ export function row_getLeftVisibleCells< } /** - * Returns right visible cells for a row. + * Collects visible cells for columns pinned to the right region. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * Cells are returned in `state.columnPinning.right` order and are marked with + * `cell.position = 'right'`. * * @example * ```ts - * const value = row_getRightVisibleCells(row) + * const rightCells = row_getRightVisibleCells(row) * ``` */ export function row_getRightVisibleCells< @@ -268,13 +276,14 @@ export function row_getRightVisibleCells< // Table APIs /** - * Updates the table's column pinning state slice. + * Routes a column pinning updater through the table's pinning change handler. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * The updater may be a next `{ left, right }` state or a function of the + * previous state, matching the instance `table.setColumnPinning` behavior. * * @example * ```ts - * table_setColumnPinning(table, (old) => old) + * table_setColumnPinning(table, (old) => ({ ...old, left: ['select'] })) * ``` */ export function table_setColumnPinning< @@ -288,9 +297,11 @@ export function table_setColumnPinning< } /** - * Resets the table's column pinning state slice. + * Resets `columnPinning` to the configured initial state or feature default. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset clones `table.initialState.columnPinning` when it + * exists. Passing `true` ignores initial state and resets to empty left/right + * arrays. * * @example * ```ts @@ -313,13 +324,14 @@ export function table_resetColumnPinning< } /** - * Returns is some columns pinned for the table. + * Checks whether any columns are pinned. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Omit `position` to check both sides, or pass `'left'`/`'right'` to inspect a + * single pinning region. * * @example * ```ts - * const value = table_getIsSomeColumnsPinned(table) + * const hasPinnedColumns = table_getIsSomeColumnsPinned(table) * ``` */ export function table_getIsSomeColumnsPinned< @@ -337,13 +349,14 @@ export function table_getIsSomeColumnsPinned< // header groups /** - * Returns left header groups for the table. + * Builds header groups for visible columns pinned to the left region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The leaf columns are read in `state.columnPinning.left` order and then passed + * through the same header-group builder as the unpinned table. * * @example * ```ts - * const value = table_getLeftHeaderGroups(table) + * const headerGroups = table_getLeftHeaderGroups(table) * ``` */ export function table_getLeftHeaderGroups< @@ -374,13 +387,14 @@ export function table_getLeftHeaderGroups< } /** - * Returns right header groups for the table. + * Builds header groups for visible columns pinned to the right region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The leaf columns are read in `state.columnPinning.right` order and then + * passed through the same header-group builder as the unpinned table. * * @example * ```ts - * const value = table_getRightHeaderGroups(table) + * const headerGroups = table_getRightHeaderGroups(table) * ``` */ export function table_getRightHeaderGroups< @@ -411,13 +425,14 @@ export function table_getRightHeaderGroups< } /** - * Returns center header groups for the table. + * Builds header groups for visible columns that are not pinned. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Left- and right-pinned column ids are removed from the visible leaf column + * list before header groups are built for the center region. * * @example * ```ts - * const value = table_getCenterHeaderGroups(table) + * const headerGroups = table_getCenterHeaderGroups(table) * ``` */ export function table_getCenterHeaderGroups< @@ -445,13 +460,13 @@ export function table_getCenterHeaderGroups< // footer groups /** - * Returns left footer groups for the table. + * Builds footer groups for the left pinned region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Footer groups reuse the left header groups in reverse order. * * @example * ```ts - * const value = table_getLeftFooterGroups(table) + * const footerGroups = table_getLeftFooterGroups(table) * ``` */ export function table_getLeftFooterGroups< @@ -467,13 +482,13 @@ export function table_getLeftFooterGroups< } /** - * Returns right footer groups for the table. + * Builds footer groups for the right pinned region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Footer groups reuse the right header groups in reverse order. * * @example * ```ts - * const value = table_getRightFooterGroups(table) + * const footerGroups = table_getRightFooterGroups(table) * ``` */ export function table_getRightFooterGroups< @@ -489,13 +504,13 @@ export function table_getRightFooterGroups< } /** - * Returns center footer groups for the table. + * Builds footer groups for the center, unpinned region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Footer groups reuse the center header groups in reverse order. * * @example * ```ts - * const value = table_getCenterFooterGroups(table) + * const footerGroups = table_getCenterFooterGroups(table) * ``` */ export function table_getCenterFooterGroups< @@ -513,13 +528,13 @@ export function table_getCenterFooterGroups< // flat headers /** - * Returns left flat headers for the table. + * Flattens every header from the left pinned header groups. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Parent headers and placeholder headers are included. * * @example * ```ts - * const value = table_getLeftFlatHeaders(table) + * const headers = table_getLeftFlatHeaders(table) * ``` */ export function table_getLeftFlatHeaders< @@ -542,13 +557,13 @@ export function table_getLeftFlatHeaders< } /** - * Returns right flat headers for the table. + * Flattens every header from the right pinned header groups. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Parent headers and placeholder headers are included. * * @example * ```ts - * const value = table_getRightFlatHeaders(table) + * const headers = table_getRightFlatHeaders(table) * ``` */ export function table_getRightFlatHeaders< @@ -571,13 +586,13 @@ export function table_getRightFlatHeaders< } /** - * Returns center flat headers for the table. + * Flattens every header from the center header groups. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Parent headers and placeholder headers are included. * * @example * ```ts - * const value = table_getCenterFlatHeaders(table) + * const headers = table_getCenterFlatHeaders(table) * ``` */ export function table_getCenterFlatHeaders< @@ -602,13 +617,13 @@ export function table_getCenterFlatHeaders< // leaf headers /** - * Returns left leaf headers for the table. + * Collects leaf headers for the left pinned region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Parent headers are filtered out from the left flat header list. * * @example * ```ts - * const value = table_getLeftLeafHeaders(table) + * const headers = table_getLeftLeafHeaders(table) * ``` */ export function table_getLeftLeafHeaders< @@ -623,13 +638,13 @@ export function table_getLeftLeafHeaders< } /** - * Returns right leaf headers for the table. + * Collects leaf headers for the right pinned region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Parent headers are filtered out from the right flat header list. * * @example * ```ts - * const value = table_getRightLeafHeaders(table) + * const headers = table_getRightLeafHeaders(table) * ``` */ export function table_getRightLeafHeaders< @@ -644,13 +659,13 @@ export function table_getRightLeafHeaders< } /** - * Returns center leaf headers for the table. + * Collects leaf headers for the center, unpinned region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Parent headers are filtered out from the center flat header list. * * @example * ```ts - * const value = table_getCenterLeafHeaders(table) + * const headers = table_getCenterLeafHeaders(table) * ``` */ export function table_getCenterLeafHeaders< @@ -667,13 +682,14 @@ export function table_getCenterLeafHeaders< // leaf columns /** - * Returns left leaf columns for the table. + * Resolves leaf columns pinned to the left region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The result follows `state.columnPinning.left` order and skips stale ids that + * no longer correspond to a leaf column. * * @example * ```ts - * const value = table_getLeftLeafColumns(table) + * const columns = table_getLeftLeafColumns(table) * ``` */ export function table_getLeftLeafColumns< @@ -692,13 +708,14 @@ export function table_getLeftLeafColumns< } /** - * Returns right leaf columns for the table. + * Resolves leaf columns pinned to the right region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The result follows `state.columnPinning.right` order and skips stale ids that + * no longer correspond to a leaf column. * * @example * ```ts - * const value = table_getRightLeafColumns(table) + * const columns = table_getRightLeafColumns(table) * ``` */ export function table_getRightLeafColumns< @@ -717,13 +734,13 @@ export function table_getRightLeafColumns< } /** - * Returns center leaf columns for the table. + * Resolves leaf columns that are not pinned to either side. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Left- and right-pinned ids are removed from `table.getAllLeafColumns()`. * * @example * ```ts - * const value = table_getCenterLeafColumns(table) + * const columns = table_getCenterLeafColumns(table) * ``` */ export function table_getCenterLeafColumns< @@ -737,13 +754,14 @@ export function table_getCenterLeafColumns< } /** - * Returns pinned leaf columns for the table. + * Resolves leaf columns for a requested pinning region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Pass `'left'`, `'center'`, or `'right'` for a partition, or pass `false` to + * read all leaf columns without partitioning. * * @example * ```ts - * const value = table_getPinnedLeafColumns(table) + * const columns = table_getPinnedLeafColumns(table, 'center') * ``` */ export function table_getPinnedLeafColumns< @@ -777,13 +795,13 @@ export function table_getPinnedLeafColumns< // visible leaf columns /** - * Returns left visible leaf columns for the table. + * Resolves visible leaf columns pinned to the left region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Hidden pinned columns are filtered out after the left pin order is applied. * * @example * ```ts - * const value = table_getLeftVisibleLeafColumns(table) + * const columns = table_getLeftVisibleLeafColumns(table) * ``` */ export function table_getLeftVisibleLeafColumns< @@ -800,13 +818,13 @@ export function table_getLeftVisibleLeafColumns< } /** - * Returns right visible leaf columns for the table. + * Resolves visible leaf columns pinned to the right region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Hidden pinned columns are filtered out after the right pin order is applied. * * @example * ```ts - * const value = table_getRightVisibleLeafColumns(table) + * const columns = table_getRightVisibleLeafColumns(table) * ``` */ export function table_getRightVisibleLeafColumns< @@ -823,13 +841,14 @@ export function table_getRightVisibleLeafColumns< } /** - * Returns center visible leaf columns for the table. + * Resolves visible leaf columns that are not pinned. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * This is the center partition used by layouts that render pinned columns + * separately from the scrollable middle region. * * @example * ```ts - * const value = table_getCenterVisibleLeafColumns(table) + * const columns = table_getCenterVisibleLeafColumns(table) * ``` */ export function table_getCenterVisibleLeafColumns< @@ -846,13 +865,14 @@ export function table_getCenterVisibleLeafColumns< } /** - * Returns pinned visible leaf columns for the table. + * Resolves visible leaf columns for a requested pinning region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Omit `position` to get all visible leaf columns, or pass `'left'`, `'center'`, + * or `'right'` to get one partition. * * @example * ```ts - * const value = table_getPinnedVisibleLeafColumns(table) + * const columns = table_getPinnedVisibleLeafColumns(table, 'left') * ``` */ export function table_getPinnedVisibleLeafColumns< diff --git a/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts b/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts index eefef80be3..3a6e3df7f7 100644 --- a/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts +++ b/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts @@ -14,13 +14,14 @@ import type { ColumnSizingState } from '../column-sizing/columnSizingFeature.typ import type { columnResizingState } from './columnResizingFeature.types' /** - * Returns the default column resizing state. + * Creates the default transient column resizing state. * - * Feature constructors use this value to initialize the table state or option defaults when no user value is provided. + * The feature default represents no active drag interaction. Reset APIs use + * this value when `defaultState` is `true`. * * @example * ```ts - * const initialValue = getDefaultColumnResizingState() + * const resizeInfo = getDefaultColumnResizingState() * ``` */ export function getDefaultColumnResizingState(): columnResizingState { @@ -35,13 +36,14 @@ export function getDefaultColumnResizingState(): columnResizingState { } /** - * Returns whether a column can use resize. + * Checks whether this column can start a resize interaction. * - * This combines column options, table options, and any required accessor or feature state for the capability. + * Both `columnDef.enableResizing` and table `enableColumnResizing` default to + * `true`. * * @example * ```ts - * const value = column_getCanResize(column) + * const canResize = column_getCanResize(column) * ``` */ export function column_getCanResize< @@ -56,13 +58,13 @@ export function column_getCanResize< } /** - * Returns is resizing for a column. + * Checks whether this column is the active column resize target. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * The value is read from `state.columnResizing.isResizingColumn`. * * @example * ```ts - * const value = column_getIsResizing(column) + * const isResizing = column_getIsResizing(column) * ``` */ export function column_getIsResizing< @@ -76,9 +78,11 @@ export function column_getIsResizing< } /** - * Returns resize handler for a header. + * Creates the pointer/touch start handler for resizing a header. * - * This is the static implementation behind the matching header instance API and can account for nested header groups. + * The handler records starting sizes for all leaf headers, tracks drag deltas, + * writes transient resize info, and commits column sizes on change or drag end + * depending on `columnResizeMode`. * * @example * ```ts @@ -263,13 +267,14 @@ export function header_getResizeHandler< } /** - * Updates the table's column resizing state slice. + * Routes a transient column resizing updater through the table's resize handler. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * This state tracks the active drag interaction; committed widths live in + * `columnSizing`. * * @example * ```ts - * table_setColumnResizing(table, (old) => old) + * table_setColumnResizing(table, (old) => ({ ...old, deltaOffset: 12 })) * ``` */ export function table_setColumnResizing< @@ -283,9 +288,11 @@ export function table_setColumnResizing< } /** - * Resets the table's header size info state slice. + * Resets `columnResizing` to the configured initial state or feature default. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset clones `table.initialState.columnResizing` when + * it exists. Passing `true` ignores initial state and resets to the no-drag + * default state. * * @example * ```ts @@ -310,7 +317,8 @@ export function table_resetHeaderSizeInfo< /** * Detects whether the current environment supports passive event listeners. * - * Column resizing uses this to register pointer and touch listeners with the safest available options. + * Column resizing uses this to register pointer and touch listeners with + * `passive: false` only when the environment understands passive options. * * @example * ```ts @@ -343,9 +351,10 @@ export function passiveEventSupported() { } /** - * Returns whether an event is a touch-start event. + * Narrows an unknown event to a `touchstart` event. * - * Column resizing uses this to normalize mouse and touch resize interactions. + * Column resizing uses this before reading touch coordinates and installing + * touch-specific listeners. * * @example * ```ts diff --git a/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts b/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts index 4ac65058eb..89ce6ce02c 100644 --- a/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts +++ b/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts @@ -15,13 +15,14 @@ import type { Column_Internal } from '../../types/Column' import type { ColumnSizingState } from './columnSizingFeature.types' /** - * Returns the default column sizing state. + * Creates the default committed column sizing state. * - * Feature constructors use this value to initialize the table state or option defaults when no user value is provided. + * The feature default is an empty map, so columns fall back to their column def + * size or the built-in sizing defaults. * * @example * ```ts - * const initialValue = getDefaultColumnSizingState() + * const sizing = getDefaultColumnSizingState() * ``` */ export function getDefaultColumnSizingState(): ColumnSizingState { @@ -29,13 +30,15 @@ export function getDefaultColumnSizingState(): ColumnSizingState { } /** - * Returns the default column sizing column def. + * Creates the built-in sizing defaults for column definitions. * - * Feature constructors use this value to initialize the table state or option defaults when no user value is provided. + * Columns default to `size: 150`, `minSize: 20`, and + * `maxSize: Number.MAX_SAFE_INTEGER` unless overridden by column definitions or + * table defaults. * * @example * ```ts - * const initialValue = getDefaultColumnSizingColumnDef() + * const defaults = getDefaultColumnSizingColumnDef() * ``` */ export function getDefaultColumnSizingColumnDef() { @@ -47,13 +50,14 @@ export function getDefaultColumnSizingColumnDef() { } /** - * Returns size for a column. + * Resolves a column's current pixel size. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * Committed `state.columnSizing[column.id]` wins over `columnDef.size`, then the + * built-in default size. The result is clamped between min and max size. * * @example * ```ts - * const value = column_getSize(column) + * const width = column_getSize(column) * ``` */ export function column_getSize< @@ -74,13 +78,14 @@ export function column_getSize< } /** - * Returns start for a column. + * Computes the offset from the start edge of a pinning region to this column. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * The value is the sum of all previous visible leaf column sizes in the + * requested `'left'`, `'center'`, or `'right'` region. * * @example * ```ts - * const value = column_getStart(column) + * const leftOffset = column_getStart(column, 'left') * ``` */ export function column_getStart< @@ -114,13 +119,14 @@ export function column_getStart< } /** - * Returns after for a column. + * Computes the offset from the end edge of a pinning region after this column. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * The value is the sum of all following visible leaf column sizes in the + * requested region. * * @example * ```ts - * const value = column_getAfter(column) + * const rightOffset = column_getAfter(column, 'right') * ``` */ export function column_getAfter< @@ -153,13 +159,14 @@ export function column_getAfter< } /** - * Reset Size. for a column. + * Removes this column's committed size override. * - * This is the static implementation behind the matching column instance API. + * After reset, the column resolves size from `columnDef.size` or built-in + * defaults again. * * @example * ```ts - * const value = column_resetSize(column) + * column_resetSize(column) * ``` */ export function column_resetSize< @@ -173,13 +180,14 @@ export function column_resetSize< } /** - * Returns size for a header. + * Computes a header's rendered size from its leaf headers. * - * This is the static implementation behind the matching header instance API and can account for nested header groups. + * Group headers sum the sizes of all descendant leaf columns. Leaf headers use + * their column's current size. * * @example * ```ts - * const value = header_getSize(header) + * const width = header_getSize(header) * ``` */ export function header_getSize< @@ -203,13 +211,14 @@ export function header_getSize< } /** - * Returns start for a header. + * Computes a header's offset from the start of its header group. * - * This is the static implementation behind the matching header instance API and can account for nested header groups. + * The offset is the previous sibling header's start plus size, or `0` for the + * first header in the group. * * @example * ```ts - * const value = header_getStart(header) + * const offset = header_getStart(header) * ``` */ export function header_getStart< @@ -233,13 +242,14 @@ export function header_getStart< // Table APIs /** - * Updates the table's column sizing state slice. + * Routes a committed column sizing updater through the table's sizing handler. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * The updater may be a next size map or a function of the previous map, + * matching the instance `table.setColumnSizing` behavior. * * @example * ```ts - * table_setColumnSizing(table, (old) => old) + * table_setColumnSizing(table, (old) => ({ ...old, age: 96 })) * ``` */ export function table_setColumnSizing< @@ -253,9 +263,10 @@ export function table_setColumnSizing< } /** - * Resets the table's column sizing state slice. + * Resets `columnSizing` to the configured initial state or feature default. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset clones `table.initialState.columnSizing` when it + * exists. Passing `true` ignores initial state and resets to `{}`. * * @example * ```ts @@ -274,13 +285,13 @@ export function table_resetColumnSizing< } /** - * Returns total size for the table. + * Sums the rendered size of the full table header row. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * This includes left, center, and right columns in the main header group. * * @example * ```ts - * const value = table_getTotalSize(table) + * const width = table_getTotalSize(table) * ``` */ export function table_getTotalSize< @@ -295,13 +306,13 @@ export function table_getTotalSize< } /** - * Returns left total size for the table. + * Sums the rendered size of the left pinned header region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * An empty left pinning region returns `0`. * * @example * ```ts - * const value = table_getLeftTotalSize(table) + * const width = table_getLeftTotalSize(table) * ``` */ export function table_getLeftTotalSize< @@ -320,13 +331,13 @@ export function table_getLeftTotalSize< } /** - * Returns center total size for the table. + * Sums the rendered size of the center, unpinned header region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * An empty center region returns `0`. * * @example * ```ts - * const value = table_getCenterTotalSize(table) + * const width = table_getCenterTotalSize(table) * ``` */ export function table_getCenterTotalSize< @@ -345,13 +356,13 @@ export function table_getCenterTotalSize< } /** - * Returns right total size for the table. + * Sums the rendered size of the right pinned header region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * An empty right pinning region returns `0`. * * @example * ```ts - * const value = table_getRightTotalSize(table) + * const width = table_getRightTotalSize(table) * ``` */ export function table_getRightTotalSize< diff --git a/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts b/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts index fddf5ad764..7c669d871b 100644 --- a/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts +++ b/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts @@ -9,13 +9,14 @@ import type { ColumnVisibilityState } from './columnVisibilityFeature.types' import type { Row } from '../../types/Row' /** - * Returns the default column visibility state. + * Creates the default column visibility state. * - * Feature constructors use this value to initialize the table state or option defaults when no user value is provided. + * The feature default is an empty object, where missing column ids are treated + * as visible. Reset APIs use this value when `defaultState` is `true`. * * @example * ```ts - * const initialValue = getDefaultColumnVisibilityState() + * const visibility = getDefaultColumnVisibilityState() * ``` */ export function getDefaultColumnVisibilityState(): ColumnVisibilityState { @@ -23,9 +24,10 @@ export function getDefaultColumnVisibilityState(): ColumnVisibilityState { } /** - * Toggles visibility for a column. + * Updates this column's visibility when hiding is allowed. * - * The update is applied through the owning table state slice and respects the feature options for that column. + * Passing `visible` stores that value. Omitting it flips the column's current + * visibility state. Columns that cannot hide are left unchanged. * * @example * ```ts @@ -48,13 +50,15 @@ export function column_toggleVisibility< } /** - * Returns is visible for a column. + * Checks whether this column is visible. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * Leaf columns read `state.columnVisibility[column.id]`, where missing entries + * default to visible. Parent columns are visible when at least one child column + * is visible. * * @example * ```ts - * const value = column_getIsVisible(column) + * const visible = column_getIsVisible(column) * ``` */ export function column_getIsVisible< @@ -73,13 +77,13 @@ export function column_getIsVisible< } /** - * Returns whether a column can use hide. + * Checks whether this column is allowed to be hidden. * - * This combines column options, table options, and any required accessor or feature state for the capability. + * Both `columnDef.enableHiding` and table `enableHiding` default to `true`. * * @example * ```ts - * const value = column_getCanHide(column) + * const canHide = column_getCanHide(column) * ``` */ export function column_getCanHide< @@ -94,13 +98,14 @@ export function column_getCanHide< } /** - * Returns an event handler for toggling visibility handler. + * Creates a checkbox-style handler that writes this column's visibility. * - * The handler is intended for direct use in column header controls such as buttons or checkboxes. + * The handler reads `event.target.checked`, so it is intended for visibility + * controls whose checked state means "visible". * * @example * ```ts - * const value = column_getToggleVisibilityHandler(column) + * const onChange = column_getToggleVisibilityHandler(column) * ``` */ export function column_getToggleVisibilityHandler< @@ -117,13 +122,14 @@ export function column_getToggleVisibilityHandler< } /** - * Returns visible cells for a row. + * Collects the cells from this row whose columns are visible. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * When column pinning is active, the result is ordered as left-pinned cells, + * center cells, then right-pinned cells. * * @example * ```ts - * const value = row_getVisibleCells(row) + * const visibleCells = row_getVisibleCells(row) * ``` */ export function row_getVisibleCells< @@ -173,13 +179,13 @@ export function row_getVisibleCells< } /** - * Returns visible cells by column id for a row. + * Builds a lookup map of this row's visible cells keyed by column id. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * Hidden columns are omitted from the map. * * @example * ```ts - * const value = row_getVisibleCellsByColumnId(row) + * const visibleCellsById = row_getVisibleCellsByColumnId(row) * ``` */ export function row_getVisibleCellsByColumnId< @@ -198,13 +204,14 @@ export function row_getVisibleCellsByColumnId< } /** - * Returns visible flat columns for the table. + * Filters the flat column list down to visible columns. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Parent/group columns are included when `column_getIsVisible` considers them + * visible. * * @example * ```ts - * const value = table_getVisibleFlatColumns(table) + * const columns = table_getVisibleFlatColumns(table) * ``` */ export function table_getVisibleFlatColumns< @@ -219,13 +226,14 @@ export function table_getVisibleFlatColumns< } /** - * Returns visible leaf columns for the table. + * Filters leaf columns down to those currently visible. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * This is the column list most row rendering code uses before pinning-specific + * partitioning. * * @example * ```ts - * const value = table_getVisibleLeafColumns(table) + * const columns = table_getVisibleLeafColumns(table) * ``` */ export function table_getVisibleLeafColumns< @@ -240,13 +248,14 @@ export function table_getVisibleLeafColumns< } /** - * Updates the table's column visibility state slice. + * Routes a column visibility updater through the table's visibility change handler. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * The updater may be a next visibility map or a function of the previous map, + * matching the instance `table.setColumnVisibility` behavior. * * @example * ```ts - * table_setColumnVisibility(table, (old) => old) + * table_setColumnVisibility(table, (old) => ({ ...old, age: false })) * ``` */ export function table_setColumnVisibility< @@ -260,9 +269,10 @@ export function table_setColumnVisibility< } /** - * Resets the table's column visibility state slice. + * Resets `columnVisibility` to the configured initial state or feature default. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset clones `table.initialState.columnVisibility` when + * it exists. Passing `true` ignores initial state and resets to `{}`. * * @example * ```ts @@ -281,9 +291,9 @@ export function table_resetColumnVisibility< } /** - * Toggles all columns visible for the table. + * Shows or hides every hideable leaf column. * - * This is the table-level convenience API used by UI controls that affect many columns or rows at once. + * Columns that cannot hide stay visible when toggling all columns off. * * @example * ```ts @@ -307,13 +317,14 @@ export function table_toggleAllColumnsVisible< } /** - * Returns is all columns visible for the table. + * Checks whether every leaf column is currently visible. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Non-hideable columns are naturally visible because missing visibility entries + * default to `true`. * * @example * ```ts - * const value = table_getIsAllColumnsVisible(table) + * const allVisible = table_getIsAllColumnsVisible(table) * ``` */ export function table_getIsAllColumnsVisible< @@ -329,13 +340,13 @@ export function table_getIsAllColumnsVisible< } /** - * Returns is some columns visible for the table. + * Checks whether at least one leaf column is currently visible. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * This is useful for tri-state "show all columns" controls. * * @example * ```ts - * const value = table_getIsSomeColumnsVisible(table) + * const someVisible = table_getIsSomeColumnsVisible(table) * ``` */ export function table_getIsSomeColumnsVisible< @@ -350,13 +361,14 @@ export function table_getIsSomeColumnsVisible< } /** - * Returns an event handler for all columns visibility handler. + * Creates a checkbox-style handler that shows or hides all columns. * - * The handler calls the matching table toggle API and can be attached directly to checkbox or button UI. + * The handler reads `event.target.checked`, so it is intended for controls whose + * checked state means "all columns visible". * * @example * ```ts - * const value = table_getToggleAllColumnsVisibilityHandler(table) + * const onChange = table_getToggleAllColumnsVisibilityHandler(table) * ``` */ export function table_getToggleAllColumnsVisibilityHandler< diff --git a/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts b/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts index c2f112f894..dd40cd1060 100644 --- a/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts +++ b/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts @@ -7,13 +7,14 @@ import type { TableFeatures } from '../../types/TableFeatures' import type { Table_Internal } from '../../types/Table' /** - * Returns whether a column can use global filter. + * Checks whether this accessor column participates in global filtering. * - * This combines column options, table options, and any required accessor or feature state for the capability. + * The column must have an accessor and pass column-level, table-level, and + * optional `getColumnCanGlobalFilter` checks. * * @example * ```ts - * const value = column_getCanGlobalFilter(column) + * const canGlobalFilter = column_getCanGlobalFilter(column) * ``` */ export function column_getCanGlobalFilter< @@ -31,13 +32,14 @@ export function column_getCanGlobalFilter< } /** - * Returns global auto filter fn for the table. + * Provides the built-in automatic global filter function. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Global filtering defaults to `includesString`, which gives search-box style + * matching across globally filterable columns. * * @example * ```ts - * const value = table_getGlobalAutoFilterFn(table) + * const filterFn = table_getGlobalAutoFilterFn() * ``` */ export function table_getGlobalAutoFilterFn() { @@ -45,13 +47,15 @@ export function table_getGlobalAutoFilterFn() { } /** - * Returns global filter fn for the table. + * Resolves the filter function used for global filtering. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Function-valued `options.globalFilterFn` is returned directly, `'auto'` + * delegates to `table_getGlobalAutoFilterFn`, and string values are looked up in + * the table's filter function registry. * * @example * ```ts - * const value = table_getGlobalFilterFn(table) + * const filterFn = table_getGlobalFilterFn(table) * ``` */ export function table_getGlobalFilterFn< @@ -72,13 +76,14 @@ export function table_getGlobalFilterFn< } /** - * Updates the table's global filter state slice. + * Routes a global filter updater through the table's global filter handler. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * The updater may be a next value or a function of the previous value, matching + * the instance `table.setGlobalFilter` behavior. * * @example * ```ts - * table_setGlobalFilter(table, (old) => old) + * table_setGlobalFilter(table, 'search text') * ``` */ export function table_setGlobalFilter< @@ -89,9 +94,10 @@ export function table_setGlobalFilter< } /** - * Resets the table's global filter state slice. + * Resets `globalFilter` to the configured initial state or feature default. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset clones `table.initialState.globalFilter`. Passing + * `true` ignores initial state and resets to `undefined`. * * @example * ```ts diff --git a/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts b/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts index fead653241..359a944620 100644 --- a/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts +++ b/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts @@ -8,13 +8,14 @@ const defaultPageIndex = 0 const defaultPageSize = 10 /** - * Returns the default pagination state. + * Creates the default pagination state used by the pagination feature. * - * Feature constructors use this value to initialize the table state or option defaults when no user value is provided. + * The feature default starts at the first page with a page size of 10. Reset + * APIs use this value when `defaultState` is `true`. * * @example * ```ts - * const initialValue = getDefaultPaginationState() + * const pagination = getDefaultPaginationState() * ``` */ export function getDefaultPaginationState(): PaginationState { @@ -25,9 +26,11 @@ export function getDefaultPaginationState(): PaginationState { } /** - * Schedules an automatic reset for page index. + * Resets the page index when a page-altering change should return to page 0. * - * The reset only runs when the related feature options allow automatic resets for the current table state change. + * The reset runs when `autoResetAll`, `autoResetPageIndex`, or the default + * client-side pagination behavior allows it. Manual pagination opts out unless + * the reset options explicitly opt back in. * * @example * ```ts @@ -48,9 +51,11 @@ export function table_autoResetPageIndex< } /** - * Updates the table's pagination state slice. + * Routes a pagination updater through the table's pagination change handler. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * The updater may be a next state object or a function of the previous + * `PaginationState`; controlled state and external atoms observe the same + * updater path as the instance API. * * @example * ```ts @@ -71,9 +76,11 @@ export function table_setPagination< } /** - * Resets the table's pagination state slice. + * Resets `pagination` to the configured initial state or feature default. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset clones `table.initialState.pagination` when it + * exists. Passing `true` ignores initial state and resets to + * `{ pageIndex: 0, pageSize: 10 }`. * * @example * ```ts @@ -96,9 +103,10 @@ export function table_resetPagination< } /** - * Updates the table's page index state slice. + * Updates `pagination.pageIndex` and clamps it to the known page range. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * Unknown page counts (`undefined` or `-1`) allow any non-negative page index. + * Known page counts clamp the index between `0` and `pageCount - 1`. * * @example * ```ts @@ -128,9 +136,10 @@ export function table_setPageIndex< } /** - * Resets the table's page index state slice. + * Resets only `pagination.pageIndex`. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset uses `table.initialState.pagination?.pageIndex` + * or `0`. Passing `true` always resets the page index to `0`. * * @example * ```ts @@ -152,9 +161,10 @@ export function table_resetPageIndex< } /** - * Resets the table's page size state slice. + * Resets only `pagination.pageSize`. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset uses `table.initialState.pagination?.pageSize` + * or `10`. Passing `true` always resets the page size to `10`. * * @example * ```ts @@ -176,9 +186,10 @@ export function table_resetPageSize< } /** - * Updates the table's page size state slice. + * Updates `pagination.pageSize` while preserving the current top row. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * The new size is clamped to at least `1`, and `pageIndex` is recalculated so + * the row that was previously at the top of the page remains in view. * * @example * ```ts @@ -203,13 +214,14 @@ export function table_setPageSize< } /** - * Returns page options for the table. + * Builds the zero-based page indexes available for the current page count. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Unknown or empty page counts return an empty array; otherwise the result is + * `[0, 1, ...pageCount - 1]`. * * @example * ```ts - * const value = table_getPageOptions(table) + * const pageIndexes = table_getPageOptions(table) * ``` */ export function table_getPageOptions< @@ -225,13 +237,14 @@ export function table_getPageOptions< } /** - * Returns can previous page for the table. + * Checks whether the current page index can move backward. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The first page is page index `0`, so only positive page indexes can navigate + * to a previous page. * * @example * ```ts - * const value = table_getCanPreviousPage(table) + * const canGoBack = table_getCanPreviousPage(table) * ``` */ export function table_getCanPreviousPage< @@ -242,13 +255,14 @@ export function table_getCanPreviousPage< } /** - * Returns can next page for the table. + * Checks whether the current page index can move forward. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * A `pageCount` of `-1` means the caller does not know the total page count, so + * this returns `true`. A page count of `0` returns `false`. * * @example * ```ts - * const value = table_getCanNextPage(table) + * const canGoForward = table_getCanNextPage(table) * ``` */ export function table_getCanNextPage< @@ -343,13 +357,14 @@ export function table_lastPage< } /** - * Returns page count for the table. + * Resolves the number of pages for the current pagination state. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * `options.pageCount` wins for manual pagination. Otherwise the value is + * calculated from `table_getRowCount(table)` and the current `pageSize`. * * @example * ```ts - * const value = table_getPageCount(table) + * const pages = table_getPageCount(table) * ``` */ export function table_getPageCount< @@ -366,13 +381,15 @@ export function table_getPageCount< } /** - * Returns row count for the table. + * Resolves the total row count used for pagination math. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * `options.rowCount` wins for manual pagination. Otherwise the count comes + * from the pre-paginated row model so filtering, grouping, sorting, and + * expansion are reflected before the page slice is applied. * * @example * ```ts - * const value = table_getRowCount(table) + * const rows = table_getRowCount(table) * ``` */ export function table_getRowCount< diff --git a/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts b/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts index 22ceb6e040..371438030e 100644 --- a/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts +++ b/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts @@ -13,13 +13,14 @@ import type { // State Utils /** - * Returns the default sorting state. + * Creates the default sorting state. * - * Feature constructors use this value to initialize the table state or option defaults when no user value is provided. + * The feature default is an empty array, meaning no columns are sorted. Reset + * APIs use this value when `defaultState` is `true`. * * @example * ```ts - * const initialValue = getDefaultSortingState() + * const sorting = getDefaultSortingState() * ``` */ export function getDefaultSortingState(): SortingState { @@ -27,13 +28,14 @@ export function getDefaultSortingState(): SortingState { } /** - * Updates the table's sorting state slice. + * Routes a sorting updater through the table's sorting change handler. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * The updater may be a next `SortingState` array or a function of the previous + * sorting state, matching the instance `table.setSorting` behavior. * * @example * ```ts - * table_setSorting(table, (old) => old) + * table_setSorting(table, (old) => [...old, { id: 'age', desc: true }]) * ``` */ export function table_setSorting< @@ -44,9 +46,10 @@ export function table_setSorting< } /** - * Resets the table's sorting state slice. + * Resets `sorting` to the configured initial state or feature default. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset clones `table.initialState.sorting` when it + * exists. Passing `true` ignores initial state and resets to `[]`. * * @example * ```ts @@ -67,13 +70,15 @@ export function table_resetSorting< // Column Utils /** - * Infers sort fn for a column. + * Chooses a built-in sorting function from sampled filtered row values. * - * The inference uses the column definition, table options, and sampled row values when needed. + * Date-like values use `datetime`, mixed text/numeric strings use + * `alphanumeric`, plain strings use `text`, and unknown values fall back to + * `basic`. * * @example * ```ts - * const value = column_getAutoSortFn(column) + * const sortFn = column_getAutoSortFn(column) * ``` */ export function column_getAutoSortFn< @@ -114,13 +119,14 @@ export function column_getAutoSortFn< } /** - * Infers sort dir for a column. + * Chooses the default first sort direction from the first filtered row value. * - * The inference uses the column definition, table options, and sampled row values when needed. + * String columns start ascending so alphabetical order is natural; other value + * types start descending. * * @example * ```ts - * const value = column_getAutoSortDir(column) + * const direction = column_getAutoSortDir(column) * ``` */ export function column_getAutoSortDir< @@ -140,13 +146,15 @@ export function column_getAutoSortDir< } /** - * Returns sort fn for a column. + * Resolves the sorting function configured for a column. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * Function-valued `columnDef.sortFn` is returned directly, `'auto'` delegates + * to `column_getAutoSortFn`, and string values are looked up in the table's + * sorting function registry before falling back to `basic`. * * @example * ```ts - * const value = column_getSortFn(column) + * const sortFn = column_getSortFn(column) * ``` */ export function column_getSortFn< @@ -165,13 +173,15 @@ export function column_getSortFn< } /** - * Toggles sorting for a column. + * Applies the next sorting state for this column. * - * The update is applied through the owning table state slice and respects the feature options for that column. + * The toggle can add, replace, flip, or remove this column's sort entry. Multi + * sorting respects `enableMultiSort`, `maxMultiSortColCount`, and the `multi` + * argument. * * @example * ```ts - * column_toggleSorting(column) + * column_toggleSorting(column, undefined, true) * ``` */ export function column_toggleSorting< @@ -278,13 +288,14 @@ export function column_toggleSorting< } /** - * Returns first sort dir for a column. + * Resolves the first direction used when this column begins sorting. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * Column-level `sortDescFirst` wins, then table-level `sortDescFirst`, then the + * auto direction inferred from sampled values. * * @example * ```ts - * const value = column_getFirstSortDir(column) + * const firstDirection = column_getFirstSortDir(column) * ``` */ export function column_getFirstSortDir< @@ -300,13 +311,14 @@ export function column_getFirstSortDir< } /** - * Returns next sorting order for a column. + * Resolves the next sort order for this column's toggle cycle. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * The cycle starts with the first sort direction, flips between `asc` and + * `desc`, and can return `false` when sorting removal is enabled. * * @example * ```ts - * const value = column_getNextSortingOrder(column) + * const nextOrder = column_getNextSortingOrder(column) * ``` */ export function column_getNextSortingOrder< @@ -332,13 +344,14 @@ export function column_getNextSortingOrder< } /** - * Returns whether a column can use sort. + * Checks whether this accessor column can participate in sorting. * - * This combines column options, table options, and any required accessor or feature state for the capability. + * The column must have an accessor and sorting must be enabled by both the + * column definition and table options. * * @example * ```ts - * const value = column_getCanSort(column) + * const canSort = column_getCanSort(column) * ``` */ export function column_getCanSort< @@ -354,13 +367,14 @@ export function column_getCanSort< } /** - * Returns whether a column can use multi sort. + * Checks whether this column can be added to a multi-sort state. * - * This combines column options, table options, and any required accessor or feature state for the capability. + * Column-level `enableMultiSort` wins over table-level `enableMultiSort`; if + * neither is set, accessor columns can multi-sort by default. * * @example * ```ts - * const value = column_getCanMultiSort(column) + * const canMultiSort = column_getCanMultiSort(column) * ``` */ export function column_getCanMultiSort< @@ -378,11 +392,12 @@ export function column_getCanMultiSort< /** * Returns is sorted for a column. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * The result is `false` when the column is not sorted, otherwise `'asc'` or + * `'desc'` based on the column's entry in `state.sorting`. * * @example * ```ts - * const value = column_getIsSorted(column) + * const direction = column_getIsSorted(column) * ``` */ export function column_getIsSorted< @@ -397,13 +412,13 @@ export function column_getIsSorted< } /** - * Returns sort index for a column. + * Finds this column's position in the ordered `state.sorting` array. * - * This derives the value from the column definition, table options, and the feature state atoms registered on the table. + * The result is `-1` when the column is not sorted. * * @example * ```ts - * const value = column_getSortIndex(column) + * const index = column_getSortIndex(column) * ``` */ export function column_getSortIndex< @@ -418,13 +433,13 @@ export function column_getSortIndex< } /** - * Clear Sorting. for a column. + * Removes this column from the sorting state. * - * This is the static implementation behind the matching column instance API. + * Other sorted columns are preserved, including their relative order. * * @example * ```ts - * const value = column_clearSorting(column) + * column_clearSorting(column) * ``` */ export function column_clearSorting< @@ -439,13 +454,15 @@ export function column_clearSorting< } /** - * Returns an event handler for toggling sorting handler. + * Creates a header event handler that toggles this column's sorting. * - * The handler is intended for direct use in column header controls such as buttons or checkboxes. + * The handler ignores events when the column cannot sort, persists React-style + * synthetic events when present, and asks `options.isMultiSortEvent` whether + * the event should add to a multi-sort. * * @example * ```ts - * const value = column_getToggleSortingHandler(column) + * const onClick = column_getToggleSortingHandler(column) * ``` */ export function column_getToggleSortingHandler< From 0e692aa84773b4e56fbfb75320dd25d8190d639d Mon Sep 17 00:00:00 2001 From: Kevin Van Cott Date: Sat, 16 May 2026 22:27:05 -0500 Subject: [PATCH 2/2] more jsdoc fixes --- .../index/functions/createColumnHelper.md | 14 +- .../reference/index/functions/tableOptions.md | 37 ++-- .../interfaces/CachedRowModel_Expanded.md | 4 +- .../interfaces/CachedRowModel_Faceted.md | 8 +- .../interfaces/CachedRowModel_Filtered.md | 4 +- .../interfaces/CachedRowModel_Grouped.md | 4 +- .../interfaces/CachedRowModel_Paginated.md | 4 +- .../index/interfaces/CachedRowModel_Sorted.md | 4 +- .../index/interfaces/Cell_ColumnGrouping.md | 14 +- .../interfaces/ColumnDef_ColumnFiltering.md | 9 +- .../interfaces/ColumnDef_ColumnGrouping.md | 8 +- .../interfaces/ColumnDef_ColumnPinning.md | 9 +- .../interfaces/ColumnDef_ColumnResizing.md | 4 +- .../interfaces/ColumnDef_ColumnSizing.md | 6 +- .../interfaces/ColumnDef_ColumnVisibility.md | 6 +- .../interfaces/ColumnDef_GlobalFiltering.md | 7 +- .../index/interfaces/ColumnDefaultOptions.md | 6 +- .../interfaces/ColumnOrderDefaultOptions.md | 4 +- .../interfaces/ColumnPinningDefaultOptions.md | 4 +- .../index/interfaces/Column_Column.md | 7 +- .../index/interfaces/Column_ColumnFaceting.md | 13 +- .../interfaces/Column_ColumnFiltering.md | 27 +-- .../index/interfaces/Column_ColumnGrouping.md | 22 +-- .../index/interfaces/Column_ColumnOrdering.md | 19 ++- .../index/interfaces/Column_ColumnPinning.md | 19 ++- .../index/interfaces/Column_ColumnResizing.md | 10 +- .../index/interfaces/Column_ColumnSizing.md | 21 ++- .../interfaces/Column_ColumnVisibility.md | 16 +- .../reference/index/interfaces/Column_Core.md | 7 +- .../interfaces/Column_GlobalFiltering.md | 6 +- .../index/interfaces/Column_RowSorting.md | 6 +- .../interfaces/CreateRowModel_Expanded.md | 4 +- .../interfaces/CreateRowModel_Faceted.md | 8 +- .../interfaces/CreateRowModel_Filtered.md | 4 +- .../interfaces/CreateRowModel_Grouped.md | 4 +- .../interfaces/CreateRowModel_Paginated.md | 4 +- .../index/interfaces/CreateRowModel_Sorted.md | 4 +- .../index/interfaces/HeaderContext.md | 8 +- .../index/interfaces/HeaderGroup_Core.md | 6 +- .../index/interfaces/HeaderGroup_Header.md | 8 +- .../index/interfaces/Header_ColumnResizing.md | 9 +- .../index/interfaces/Header_ColumnSizing.md | 8 +- .../reference/index/interfaces/Header_Core.md | 26 +-- .../index/interfaces/Header_CoreProperties.md | 24 +-- .../index/interfaces/Header_Header.md | 28 ++-- .../index/interfaces/IdIdentifier.md | 10 +- .../interfaces/RowPinningDefaultOptions.md | 4 +- .../index/interfaces/Row_ColumnFiltering.md | 6 +- .../index/interfaces/Row_ColumnGrouping.md | 16 +- .../index/interfaces/Row_ColumnPinning.md | 14 +- .../index/interfaces/Row_ColumnVisibility.md | 10 +- docs/reference/index/interfaces/Row_Core.md | 8 +- docs/reference/index/interfaces/Row_Row.md | 8 +- .../index/interfaces/Row_RowExpanding.md | 8 +- .../index/interfaces/Row_RowPinning.md | 12 +- .../index/interfaces/Row_RowSelection.md | 32 ++-- .../interfaces/StringHeaderIdentifier.md | 10 +- .../TableOptions_ColumnFiltering.md | 20 ++- .../interfaces/TableOptions_ColumnGrouping.md | 12 +- .../interfaces/TableOptions_ColumnPinning.md | 9 +- .../index/interfaces/TableOptions_Columns.md | 6 +- .../index/interfaces/TableOptions_Core.md | 35 ++-- .../TableOptions_GlobalFiltering.md | 12 +- .../interfaces/TableOptions_RowExpanding.md | 2 +- .../interfaces/TableOptions_RowPinning.md | 10 +- .../interfaces/TableOptions_RowSelection.md | 24 +-- .../interfaces/TableOptions_RowSorting.md | 2 +- .../index/interfaces/TableOptions_Table.md | 26 +-- .../index/interfaces/Table_ColumnFaceting.md | 10 +- .../index/interfaces/Table_ColumnFiltering.md | 12 +- .../index/interfaces/Table_ColumnGrouping.md | 12 +- .../index/interfaces/Table_ColumnOrdering.md | 12 +- .../index/interfaces/Table_ColumnPinning.md | 97 ++++++----- .../index/interfaces/Table_ColumnResizing.md | 11 +- .../index/interfaces/Table_ColumnSizing.md | 10 +- .../interfaces/Table_ColumnVisibility.md | 27 +-- .../index/interfaces/Table_Columns.md | 24 +-- .../index/interfaces/Table_CoreProperties.md | 30 ++-- .../index/interfaces/Table_GlobalFiltering.md | 16 +- .../index/interfaces/Table_Headers.md | 18 +- .../index/interfaces/Table_RowExpanding.md | 23 +-- .../interfaces/Table_RowModels_Expanded.md | 10 +- .../interfaces/Table_RowModels_Faceted.md | 23 +-- .../interfaces/Table_RowModels_Filtered.md | 10 +- .../interfaces/Table_RowModels_Grouped.md | 10 +- .../interfaces/Table_RowModels_Paginated.md | 10 +- .../interfaces/Table_RowModels_Sorted.md | 10 +- .../index/interfaces/Table_RowPagination.md | 53 +++--- .../index/interfaces/Table_RowPinning.md | 28 ++-- .../index/interfaces/Table_RowSelection.md | 54 +++--- .../index/interfaces/Table_RowSorting.md | 10 +- .../reference/index/interfaces/Table_Table.md | 34 ++-- .../functions/autoRemove.md | 2 +- .../namespaces/filterFn_arrIncludes/index.md | 2 +- .../functions/autoRemove.md | 2 +- .../filterFn_arrIncludesAll/index.md | 2 +- .../functions/autoRemove.md | 2 +- .../filterFn_arrIncludesSome/index.md | 2 +- .../filterFn_equals/functions/autoRemove.md | 2 +- .../index/namespaces/filterFn_equals/index.md | 4 +- .../functions/autoRemove.md | 2 +- .../namespaces/filterFn_equalsString/index.md | 5 +- .../functions/autoRemove.md | 2 +- .../filterFn_equalsStringSensitive/index.md | 4 +- .../functions/resolveFilterValue.md | 2 +- .../namespaces/filterFn_greaterThan/index.md | 5 +- .../functions/resolveFilterValue.md | 2 +- .../filterFn_greaterThanOrEqualTo/index.md | 4 +- .../functions/autoRemove.md | 2 +- .../functions/resolveFilterValue.md | 2 +- .../filterFn_inNumberRange/index.md | 5 +- .../functions/autoRemove.md | 2 +- .../filterFn_includesString/index.md | 5 +- .../functions/autoRemove.md | 2 +- .../filterFn_includesStringSensitive/index.md | 4 +- .../functions/resolveFilterValue.md | 2 +- .../namespaces/filterFn_lessThan/index.md | 4 +- .../functions/resolveFilterValue.md | 2 +- .../filterFn_lessThanOrEqualTo/index.md | 4 +- .../functions/autoRemove.md | 2 +- .../namespaces/filterFn_weakEquals/index.md | 5 +- .../index/type-aliases/AccessorColumnDef.md | 2 +- .../index/type-aliases/AccessorFn.md | 7 +- .../index/type-aliases/AccessorFnColumnDef.md | 2 +- .../type-aliases/AccessorFnColumnDefBase.md | 2 +- .../type-aliases/AccessorKeyColumnDef.md | 2 +- .../type-aliases/AccessorKeyColumnDefBase.md | 2 +- .../type-aliases/BuiltInAggregationFn.md | 2 +- .../index/type-aliases/BuiltInFilterFn.md | 2 +- .../reference/index/type-aliases/ColumnDef.md | 2 +- .../index/type-aliases/ColumnDefBase.md | 2 +- .../index/type-aliases/ColumnDefBase_All.md | 2 +- .../index/type-aliases/ColumnDefResolved.md | 2 +- .../index/type-aliases/ColumnDefTemplate.md | 7 +- .../index/type-aliases/DebugOptions.md | 2 +- .../index/type-aliases/DisplayColumnDef.md | 2 +- .../index/type-aliases/GroupColumnDef.md | 2 +- .../index/type-aliases/GroupingColumnMode.md | 2 +- .../index/type-aliases/IdentifiedColumnDef.md | 2 +- .../type-aliases/StringOrTemplateHeader.md | 2 +- .../index/type-aliases/TableOptions.md | 8 +- .../index/type-aliases/TableOptions_All.md | 5 +- .../index/type-aliases/TableState.md | 7 +- .../index/type-aliases/TableState_All.md | 7 +- .../index/variables/aggregationFn_count.md | 6 +- .../index/variables/aggregationFn_extent.md | 7 +- .../index/variables/aggregationFn_max.md | 7 +- .../index/variables/aggregationFn_mean.md | 7 +- .../index/variables/aggregationFn_median.md | 7 +- .../index/variables/aggregationFn_min.md | 7 +- .../index/variables/aggregationFn_sum.md | 7 +- .../index/variables/aggregationFn_unique.md | 6 +- .../variables/aggregationFn_uniqueCount.md | 6 +- .../index/variables/aggregationFns.md | 2 +- .../index/variables/filterFn_arrHas.md | 4 +- .../index/variables/filterFn_arrIncludes.md | 4 +- .../variables/filterFn_arrIncludesAll.md | 4 +- .../variables/filterFn_arrIncludesSome.md | 4 +- .../index/variables/filterFn_equals.md | 6 +- .../index/variables/filterFn_equalsString.md | 7 +- .../filterFn_equalsStringSensitive.md | 6 +- .../index/variables/filterFn_greaterThan.md | 7 +- .../filterFn_greaterThanOrEqualTo.md | 6 +- .../index/variables/filterFn_inNumberRange.md | 7 +- .../variables/filterFn_includesString.md | 7 +- .../filterFn_includesStringSensitive.md | 6 +- .../index/variables/filterFn_lessThan.md | 6 +- .../variables/filterFn_lessThanOrEqualTo.md | 6 +- .../index/variables/filterFn_weakEquals.md | 7 +- docs/reference/index/variables/filterFns.md | 2 +- .../functions/column_getIsSorted.md | 2 +- .../functions/getDefaultExpandedState.md | 9 +- .../functions/getDefaultRowPinningState.md | 9 +- .../functions/getDefaultRowSelectionState.md | 9 +- .../functions/isRowSelected.md | 4 +- .../functions/isSubRowSelected.md | 4 +- .../functions/row_getCanExpand.md | 9 +- .../functions/row_getCanMultiSelect.md | 9 +- .../functions/row_getCanPin.md | 9 +- .../functions/row_getCanSelect.md | 9 +- .../functions/row_getCanSelectSubRows.md | 9 +- .../functions/row_getIsAllParentsExpanded.md | 8 +- .../functions/row_getIsAllSubRowsSelected.md | 8 +- .../functions/row_getIsExpanded.md | 9 +- .../functions/row_getIsPinned.md | 9 +- .../functions/row_getIsSelected.md | 8 +- .../functions/row_getIsSomeSelected.md | 8 +- .../functions/row_getPinnedIndex.md | 8 +- .../functions/row_getToggleExpandedHandler.md | 8 +- .../functions/row_getToggleSelectedHandler.md | 9 +- .../static-functions/functions/row_pin.md | 2 +- .../functions/row_toggleExpanded.md | 8 +- .../functions/row_toggleSelected.md | 7 +- .../functions/selectRowsFn.md | 7 +- .../functions/table_autoResetExpanded.md | 8 +- .../functions/table_getBottomRows.md | 9 +- .../functions/table_getCanSomeRowsExpand.md | 9 +- .../functions/table_getCenterRows.md | 9 +- .../functions/table_getExpandedDepth.md | 9 +- .../table_getFilteredSelectedRowModel.md | 9 +- .../table_getGroupedSelectedRowModel.md | 9 +- .../table_getIsAllPageRowsSelected.md | 8 +- .../functions/table_getIsAllRowsExpanded.md | 9 +- .../functions/table_getIsAllRowsSelected.md | 9 +- .../table_getIsSomePageRowsSelected.md | 9 +- .../functions/table_getIsSomeRowsExpanded.md | 8 +- .../functions/table_getIsSomeRowsPinned.md | 9 +- .../functions/table_getIsSomeRowsSelected.md | 9 +- .../functions/table_getPreSelectedRowModel.md | 9 +- .../functions/table_getSelectedRowModel.md | 9 +- ...ble_getToggleAllPageRowsSelectedHandler.md | 9 +- .../table_getToggleAllRowsExpandedHandler.md | 9 +- .../table_getToggleAllRowsSelectedHandler.md | 9 +- .../functions/table_getTopRows.md | 9 +- .../functions/table_resetExpanded.md | 7 +- .../functions/table_resetRowPinning.md | 8 +- .../functions/table_resetRowSelection.md | 7 +- .../functions/table_setExpanded.md | 9 +- .../functions/table_setRowPinning.md | 9 +- .../functions/table_setRowSelection.md | 9 +- .../table_toggleAllPageRowsSelected.md | 7 +- .../functions/table_toggleAllRowsExpanded.md | 8 +- .../functions/table_toggleAllRowsSelected.md | 7 +- .../core/columns/coreColumnsFeature.types.ts | 13 +- .../core/headers/coreHeadersFeature.types.ts | 10 +- .../src/core/rows/coreRowsFeature.types.ts | 8 +- .../src/core/table/coreTablesFeature.types.ts | 8 +- .../columnFacetingFeature.types.ts | 26 +-- .../columnFilteringFeature.types.ts | 32 ++-- .../columnGroupingFeature.types.ts | 32 ++-- .../columnOrderingFeature.types.ts | 19 ++- .../columnPinningFeature.types.ts | 74 ++++---- .../columnResizingFeature.types.ts | 18 +- .../columnSizingFeature.types.ts | 31 ++-- .../columnVisibilityFeature.types.ts | 29 ++-- .../globalFilteringFeature.types.ts | 15 +- .../rowExpandingFeature.types.ts | 31 ++-- .../rowExpandingFeature.utils.ts | 97 ++++++----- .../rowPaginationFeature.types.ts | 31 ++-- .../row-pinning/rowPinningFeature.types.ts | 20 ++- .../row-pinning/rowPinningFeature.utils.ts | 68 ++++---- .../rowSelectionFeature.types.ts | 54 +++--- .../rowSelectionFeature.utils.ts | 158 ++++++++++-------- .../row-sorting/rowSortingFeature.types.ts | 18 +- .../row-sorting/rowSortingFeature.utils.ts | 2 +- packages/table-core/src/fns/aggregationFns.ts | 42 ++++- packages/table-core/src/fns/filterFns.ts | 65 +++++-- .../table-core/src/helpers/columnHelper.ts | 13 +- .../table-core/src/helpers/tableOptions.ts | 21 ++- packages/table-core/src/types/ColumnDef.ts | 38 +++++ packages/table-core/src/types/TableOptions.ts | 15 ++ packages/table-core/src/types/TableState.ts | 12 ++ 252 files changed, 1789 insertions(+), 1275 deletions(-) diff --git a/docs/reference/index/functions/createColumnHelper.md b/docs/reference/index/functions/createColumnHelper.md index 878ce28895..73e27173e8 100644 --- a/docs/reference/index/functions/createColumnHelper.md +++ b/docs/reference/index/functions/createColumnHelper.md @@ -9,11 +9,15 @@ title: createColumnHelper function createColumnHelper(): ColumnHelper; ``` -Defined in: [helpers/columnHelper.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/columnHelper.ts#L94) +Defined in: [helpers/columnHelper.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/columnHelper.ts#L99) -A helper utility for creating column definitions with slightly better type inference for each individual column. -The `TValue` generic is inferred based on the accessor key or function provided. -**Note:** From a JavaScript perspective, the functions in these helpers do not do anything. They are only used to help TypeScript infer the correct types for the column definitions. +Creates helper functions for authoring column definitions with stronger value +inference. + +`accessor` infers `TValue` from an accessor key or accessor function, +`display` creates non-data columns, `group` creates parent columns, and +`columns` preserves tuple-level value types for arrays. At runtime these +helpers only return column definition objects. ## Type Parameters @@ -36,6 +40,6 @@ const helper = createColumnHelper() // _features is th const columns = [ helper.display({ id: 'actions', header: 'Actions' }), helper.accessor('firstName', {}), - helper.accessor((row) => row.lastName, {} + helper.accessor((row) => row.lastName, { id: 'lastName' }), ] ``` diff --git a/docs/reference/index/functions/tableOptions.md b/docs/reference/index/functions/tableOptions.md index 288a9b98a3..0e5d26727a 100644 --- a/docs/reference/index/functions/tableOptions.md +++ b/docs/reference/index/functions/tableOptions.md @@ -16,11 +16,12 @@ overloads preserving table option inference at compile time. function tableOptions(options): Omit, "_features" | "columns"> & object; ``` -Defined in: [helpers/tableOptions.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L10) +Defined in: [helpers/tableOptions.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L11) -Returns table options while preserving generic inference. +Preserves table option inference when reusable options omit `columns`. -This helper is useful when composing reusable table options outside of a framework adapter call. +This is useful for composing shared options that will receive columns later +from a framework adapter or table factory. ### Type Parameters @@ -48,9 +49,9 @@ This helper is useful when composing reusable table options outside of a framewo function tableOptions(options): Omit, "_features" | "data"> & object; ``` -Defined in: [helpers/tableOptions.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L24) +Defined in: [helpers/tableOptions.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L25) -Returns table options while preserving generic inference when `data` is supplied later. +Preserves table option inference when reusable options omit `data`. ### Type Parameters @@ -78,9 +79,10 @@ Returns table options while preserving generic inference when `data` is supplied function tableOptions(options): Omit, "_features" | "data" | "columns"> & object; ``` -Defined in: [helpers/tableOptions.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L38) +Defined in: [helpers/tableOptions.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L40) -Returns table options while preserving generic inference when both `data` and `columns` are supplied later. +Preserves table option inference when reusable options omit both `data` and +`columns`. ### Type Parameters @@ -108,9 +110,9 @@ Returns table options while preserving generic inference when both `data` and `c function tableOptions(options): TableOptions; ``` -Defined in: [helpers/tableOptions.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L52) +Defined in: [helpers/tableOptions.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L54) -Returns a fully specified table options object without changing its runtime value. +Preserves inference for a fully specified table options object. ### Type Parameters @@ -138,9 +140,9 @@ Returns a fully specified table options object without changing its runtime valu function tableOptions(options): Omit, "_features">; ``` -Defined in: [helpers/tableOptions.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L60) +Defined in: [helpers/tableOptions.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L62) -Returns table options while preserving generic inference when `_features` is supplied by a wrapper. +Preserves inference when a wrapper supplies `_features`. ### Type Parameters @@ -168,9 +170,9 @@ Returns table options while preserving generic inference when `_features` is sup function tableOptions(options): Omit, "data" | "_features">; ``` -Defined in: [helpers/tableOptions.ts:70](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L70) +Defined in: [helpers/tableOptions.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L72) -Returns table options while preserving generic inference when `data` and `_features` are supplied by a wrapper. +Preserves inference when a wrapper supplies both `data` and `_features`. ### Type Parameters @@ -198,9 +200,9 @@ Returns table options while preserving generic inference when `data` and `_featu function tableOptions(options): Omit, "columns" | "_features">; ``` -Defined in: [helpers/tableOptions.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L80) +Defined in: [helpers/tableOptions.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L82) -Returns table options while preserving generic inference when `columns` and `_features` are supplied by a wrapper. +Preserves inference when a wrapper supplies both `columns` and `_features`. ### Type Parameters @@ -228,9 +230,10 @@ Returns table options while preserving generic inference when `columns` and `_fe function tableOptions(options): Omit, "data" | "columns" | "_features">; ``` -Defined in: [helpers/tableOptions.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L90) +Defined in: [helpers/tableOptions.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/helpers/tableOptions.ts#L93) -Returns table options while preserving generic inference when `data`, `columns`, and `_features` are supplied by a wrapper. +Preserves inference when a wrapper supplies `data`, `columns`, and +`_features`. ### Type Parameters diff --git a/docs/reference/index/interfaces/CachedRowModel_Expanded.md b/docs/reference/index/interfaces/CachedRowModel_Expanded.md index ade90d1329..3a8a9c6e28 100644 --- a/docs/reference/index/interfaces/CachedRowModel_Expanded.md +++ b/docs/reference/index/interfaces/CachedRowModel_Expanded.md @@ -5,7 +5,7 @@ title: CachedRowModel_Expanded # Interface: CachedRowModel\_Expanded\ -Defined in: [features/row-expanding/rowExpandingFeature.types.ts:141](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L141) +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:142](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L142) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/row-expanding/rowExpandingFeature.types.ts:141](https://gi expandedRowModel: () => RowModel; ``` -Defined in: [features/row-expanding/rowExpandingFeature.types.ts:145](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L145) +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:146](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L146) #### Returns diff --git a/docs/reference/index/interfaces/CachedRowModel_Faceted.md b/docs/reference/index/interfaces/CachedRowModel_Faceted.md index 24399c09e5..cd36921fdb 100644 --- a/docs/reference/index/interfaces/CachedRowModel_Faceted.md +++ b/docs/reference/index/interfaces/CachedRowModel_Faceted.md @@ -5,7 +5,7 @@ title: CachedRowModel_Faceted # Interface: CachedRowModel\_Faceted\ -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L78) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L84) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/column-faceting/columnFacetingFeature.types.ts:78](https:/ optional facetedMinMaxValues: (columnId) => [number, number]; ``` -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L83) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L89) #### Parameters @@ -45,7 +45,7 @@ Defined in: [features/column-faceting/columnFacetingFeature.types.ts:83](https:/ optional facetedRowModel: (columnId) => () => RowModel; ``` -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L82) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L88) #### Parameters @@ -71,7 +71,7 @@ Defined in: [features/column-faceting/columnFacetingFeature.types.ts:82](https:/ optional facetedUniqueValues: (columnId) => Map; ``` -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L84) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L90) #### Parameters diff --git a/docs/reference/index/interfaces/CachedRowModel_Filtered.md b/docs/reference/index/interfaces/CachedRowModel_Filtered.md index ffc38cc623..ac3d9dde53 100644 --- a/docs/reference/index/interfaces/CachedRowModel_Filtered.md +++ b/docs/reference/index/interfaces/CachedRowModel_Filtered.md @@ -5,7 +5,7 @@ title: CachedRowModel_Filtered # Interface: CachedRowModel\_Filtered\ -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:217](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L217) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:227](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L227) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/column-filtering/columnFilteringFeature.types.ts:217](http filteredRowModel: () => RowModel; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:221](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L221) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:231](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L231) #### Returns diff --git a/docs/reference/index/interfaces/CachedRowModel_Grouped.md b/docs/reference/index/interfaces/CachedRowModel_Grouped.md index 0c1af7ccde..8eedd23bad 100644 --- a/docs/reference/index/interfaces/CachedRowModel_Grouped.md +++ b/docs/reference/index/interfaces/CachedRowModel_Grouped.md @@ -5,7 +5,7 @@ title: CachedRowModel_Grouped # Interface: CachedRowModel\_Grouped\ -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:217](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L217) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:221](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L221) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/column-grouping/columnGroupingFeature.types.ts:217](https: groupedRowModel: () => RowModel; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:221](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L221) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:225](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L225) #### Returns diff --git a/docs/reference/index/interfaces/CachedRowModel_Paginated.md b/docs/reference/index/interfaces/CachedRowModel_Paginated.md index 00985ee40e..ae6f4be7ca 100644 --- a/docs/reference/index/interfaces/CachedRowModel_Paginated.md +++ b/docs/reference/index/interfaces/CachedRowModel_Paginated.md @@ -5,7 +5,7 @@ title: CachedRowModel_Paginated # Interface: CachedRowModel\_Paginated\ -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L140) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L147) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/row-pagination/rowPaginationFeature.types.ts:140](https:// paginatedRowModel: () => RowModel; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L144) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:151](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L151) #### Returns diff --git a/docs/reference/index/interfaces/CachedRowModel_Sorted.md b/docs/reference/index/interfaces/CachedRowModel_Sorted.md index 9e7ca135c8..c63dd4e190 100644 --- a/docs/reference/index/interfaces/CachedRowModel_Sorted.md +++ b/docs/reference/index/interfaces/CachedRowModel_Sorted.md @@ -5,7 +5,7 @@ title: CachedRowModel_Sorted # Interface: CachedRowModel\_Sorted\ -Defined in: [features/row-sorting/rowSortingFeature.types.ts:228](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L228) +Defined in: [features/row-sorting/rowSortingFeature.types.ts:230](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L230) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/row-sorting/rowSortingFeature.types.ts:228](https://github sortedRowModel: () => RowModel; ``` -Defined in: [features/row-sorting/rowSortingFeature.types.ts:232](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L232) +Defined in: [features/row-sorting/rowSortingFeature.types.ts:234](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L234) #### Returns diff --git a/docs/reference/index/interfaces/Cell_ColumnGrouping.md b/docs/reference/index/interfaces/Cell_ColumnGrouping.md index e4b7682d8f..690d2fc3a8 100644 --- a/docs/reference/index/interfaces/Cell_ColumnGrouping.md +++ b/docs/reference/index/interfaces/Cell_ColumnGrouping.md @@ -5,7 +5,7 @@ title: Cell_ColumnGrouping # Interface: Cell\_ColumnGrouping -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:132](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L132) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:134](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L134) ## Properties @@ -15,9 +15,9 @@ Defined in: [features/column-grouping/columnGroupingFeature.types.ts:132](https: getIsAggregated: () => boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L136) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:138](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L138) -Returns whether or not the cell is currently aggregated. +Checks whether this cell should render an aggregated value. #### Returns @@ -31,9 +31,9 @@ Returns whether or not the cell is currently aggregated. getIsGrouped: () => boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L140) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:142](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L142) -Returns whether or not the cell is currently grouped. +Checks whether this cell represents the active grouping column. #### Returns @@ -47,9 +47,9 @@ Returns whether or not the cell is currently grouped. getIsPlaceholder: () => boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L144) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:146](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L146) -Returns whether or not the cell is currently a placeholder cell. +Checks whether this cell is hidden as a grouping placeholder. #### Returns diff --git a/docs/reference/index/interfaces/ColumnDef_ColumnFiltering.md b/docs/reference/index/interfaces/ColumnDef_ColumnFiltering.md index 3128dc63b7..f8251c0569 100644 --- a/docs/reference/index/interfaces/ColumnDef_ColumnFiltering.md +++ b/docs/reference/index/interfaces/ColumnDef_ColumnFiltering.md @@ -25,9 +25,12 @@ Defined in: [features/column-filtering/columnFilteringFeature.types.ts:81](https optional enableColumnFilter: boolean; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L88) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L91) -Enables/disables the **column** filter for this column. +Enables this column to participate in column-specific filtering. + +Defaults to `true`; table-level `enableColumnFilters` and `enableFilters` +must also allow filtering. *** @@ -37,6 +40,6 @@ Enables/disables the **column** filter for this column. optional filterFn: FilterFnOption; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L92) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L95) The filter function to use with this column. Can be the name of a built-in filter function or a custom filter function. diff --git a/docs/reference/index/interfaces/ColumnDef_ColumnGrouping.md b/docs/reference/index/interfaces/ColumnDef_ColumnGrouping.md index e1d57d7f83..2e563058f0 100644 --- a/docs/reference/index/interfaces/ColumnDef_ColumnGrouping.md +++ b/docs/reference/index/interfaces/ColumnDef_ColumnGrouping.md @@ -53,9 +53,11 @@ The resolved aggregation function for the column. optional enableGrouping: boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L71) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L73) -Enables/disables grouping for this column. +Allows this column to be added to grouping state. + +Defaults to `true`; table-level `enableGrouping` must also allow grouping. *** @@ -65,7 +67,7 @@ Enables/disables grouping for this column. optional getGroupingValue: (row) => any; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L75) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L77) Specify a value to be used for grouping rows on this column. If this option is not specified, the value derived from `accessorKey` / `accessorFn` will be used instead. diff --git a/docs/reference/index/interfaces/ColumnDef_ColumnPinning.md b/docs/reference/index/interfaces/ColumnDef_ColumnPinning.md index a14df45819..396a8c3478 100644 --- a/docs/reference/index/interfaces/ColumnDef_ColumnPinning.md +++ b/docs/reference/index/interfaces/ColumnDef_ColumnPinning.md @@ -5,7 +5,7 @@ title: ColumnDef_ColumnPinning # Interface: ColumnDef\_ColumnPinning -Defined in: [features/column-pinning/columnPinningFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L36) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L39) ## Properties @@ -15,6 +15,9 @@ Defined in: [features/column-pinning/columnPinningFeature.types.ts:36](https://g optional enablePinning: boolean; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L40) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L46) -Enables/disables column pinning for this column. Defaults to `true`. +Allows this column's leaf columns to be pinned. + +Defaults to `true`; table-level `enableColumnPinning` must also allow +pinning. diff --git a/docs/reference/index/interfaces/ColumnDef_ColumnResizing.md b/docs/reference/index/interfaces/ColumnDef_ColumnResizing.md index 3a99ef6bd2..6ecb20241c 100644 --- a/docs/reference/index/interfaces/ColumnDef_ColumnResizing.md +++ b/docs/reference/index/interfaces/ColumnDef_ColumnResizing.md @@ -5,7 +5,7 @@ title: ColumnDef_ColumnResizing # Interface: ColumnDef\_ColumnResizing -Defined in: [features/column-resizing/columnResizingFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L63) +Defined in: [features/column-resizing/columnResizingFeature.types.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L64) ## Properties @@ -15,6 +15,6 @@ Defined in: [features/column-resizing/columnResizingFeature.types.ts:63](https:/ optional enableResizing: boolean; ``` -Defined in: [features/column-resizing/columnResizingFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L67) +Defined in: [features/column-resizing/columnResizingFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L68) Enables or disables column resizing for the column. diff --git a/docs/reference/index/interfaces/ColumnDef_ColumnSizing.md b/docs/reference/index/interfaces/ColumnDef_ColumnSizing.md index 644a49a293..c07f7987b9 100644 --- a/docs/reference/index/interfaces/ColumnDef_ColumnSizing.md +++ b/docs/reference/index/interfaces/ColumnDef_ColumnSizing.md @@ -17,7 +17,7 @@ optional maxSize: number; Defined in: [features/column-sizing/columnSizingFeature.types.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L56) -The maximum allowed size for the column +Upper bound used when resolving this column's size. *** @@ -29,7 +29,7 @@ optional minSize: number; Defined in: [features/column-sizing/columnSizingFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L60) -The minimum allowed size for the column +Lower bound used when resolving this column's size. *** @@ -41,4 +41,4 @@ optional size: number; Defined in: [features/column-sizing/columnSizingFeature.types.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L64) -The desired size for the column +Initial size used before column sizing state overrides it. diff --git a/docs/reference/index/interfaces/ColumnDef_ColumnVisibility.md b/docs/reference/index/interfaces/ColumnDef_ColumnVisibility.md index 5c4a8cbc3c..d004a20e2a 100644 --- a/docs/reference/index/interfaces/ColumnDef_ColumnVisibility.md +++ b/docs/reference/index/interfaces/ColumnDef_ColumnVisibility.md @@ -5,7 +5,7 @@ title: ColumnDef_ColumnVisibility # Interface: ColumnDef\_ColumnVisibility -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L68) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L71) ## Properties @@ -15,6 +15,6 @@ Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:68](htt optional enableHiding: boolean; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L72) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L75) -Enables/disables column hiding for this column. Defaults to `true`. +Allows this column to be hidden. Defaults to `true`. diff --git a/docs/reference/index/interfaces/ColumnDef_GlobalFiltering.md b/docs/reference/index/interfaces/ColumnDef_GlobalFiltering.md index b55f87b831..470bf14dd1 100644 --- a/docs/reference/index/interfaces/ColumnDef_GlobalFiltering.md +++ b/docs/reference/index/interfaces/ColumnDef_GlobalFiltering.md @@ -15,6 +15,9 @@ Defined in: [features/global-filtering/globalFilteringFeature.types.ts:18](https optional enableGlobalFilter: boolean; ``` -Defined in: [features/global-filtering/globalFilteringFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L22) +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L25) -Enables/disables the **global** filter for this column. +Allows this column to be scanned by global filtering. + +Defaults to `true`; table-level global filtering and `enableFilters` must +also allow filtering. diff --git a/docs/reference/index/interfaces/ColumnDefaultOptions.md b/docs/reference/index/interfaces/ColumnDefaultOptions.md index 9acb1cbd8d..adf1c2cd96 100644 --- a/docs/reference/index/interfaces/ColumnDefaultOptions.md +++ b/docs/reference/index/interfaces/ColumnDefaultOptions.md @@ -5,7 +5,7 @@ title: ColumnDefaultOptions # Interface: ColumnDefaultOptions -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L147) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:149](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L149) ## Properties @@ -15,7 +15,7 @@ Defined in: [features/column-grouping/columnGroupingFeature.types.ts:147](https: enableGrouping: boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:148](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L148) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:150](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L150) *** @@ -25,4 +25,4 @@ Defined in: [features/column-grouping/columnGroupingFeature.types.ts:148](https: onGroupingChange: OnChangeFn; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:149](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L149) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:151](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L151) diff --git a/docs/reference/index/interfaces/ColumnOrderDefaultOptions.md b/docs/reference/index/interfaces/ColumnOrderDefaultOptions.md index c6aad9f588..4db8a4f93e 100644 --- a/docs/reference/index/interfaces/ColumnOrderDefaultOptions.md +++ b/docs/reference/index/interfaces/ColumnOrderDefaultOptions.md @@ -5,7 +5,7 @@ title: ColumnOrderDefaultOptions # Interface: ColumnOrderDefaultOptions -Defined in: [features/column-ordering/columnOrderingFeature.types.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L35) +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L42) ## Properties @@ -15,4 +15,4 @@ Defined in: [features/column-ordering/columnOrderingFeature.types.ts:35](https:/ onColumnOrderChange: OnChangeFn; ``` -Defined in: [features/column-ordering/columnOrderingFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L36) +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L43) diff --git a/docs/reference/index/interfaces/ColumnPinningDefaultOptions.md b/docs/reference/index/interfaces/ColumnPinningDefaultOptions.md index 80af006f74..55ffaf579d 100644 --- a/docs/reference/index/interfaces/ColumnPinningDefaultOptions.md +++ b/docs/reference/index/interfaces/ColumnPinningDefaultOptions.md @@ -5,7 +5,7 @@ title: ColumnPinningDefaultOptions # Interface: ColumnPinningDefaultOptions -Defined in: [features/column-pinning/columnPinningFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L32) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L35) ## Properties @@ -15,4 +15,4 @@ Defined in: [features/column-pinning/columnPinningFeature.types.ts:32](https://g onColumnPinningChange: OnChangeFn; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L33) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L36) diff --git a/docs/reference/index/interfaces/Column_Column.md b/docs/reference/index/interfaces/Column_Column.md index 64e4ed69d8..e729d95489 100644 --- a/docs/reference/index/interfaces/Column_Column.md +++ b/docs/reference/index/interfaces/Column_Column.md @@ -103,7 +103,7 @@ getFlatColumns: () => Column[]; Defined in: [core/columns/coreColumnsFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L53) -Returns the flattened array of this column and all child/grand-child columns for this column. +Flattens this column and every descendant column into a single array. #### Returns @@ -117,9 +117,10 @@ Returns the flattened array of this column and all child/grand-child columns for getLeafColumns: () => Column[]; ``` -Defined in: [core/columns/coreColumnsFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L57) +Defined in: [core/columns/coreColumnsFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L58) -Returns an array of all leaf-node columns for this column. If a column has no children, it is considered the only leaf-node column. +Collects the terminal leaf columns below this column, or the column itself +when it has no children. #### Returns diff --git a/docs/reference/index/interfaces/Column_ColumnFaceting.md b/docs/reference/index/interfaces/Column_ColumnFaceting.md index 4aa49e99c3..a35b61176c 100644 --- a/docs/reference/index/interfaces/Column_ColumnFaceting.md +++ b/docs/reference/index/interfaces/Column_ColumnFaceting.md @@ -27,7 +27,7 @@ getFacetedMinMaxValues: () => [number, number] | undefined; Defined in: [features/column-faceting/columnFacetingFeature.types.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L13) -A function that **computes and returns** a min/max tuple derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. +Computes min/max numeric facet values for this column. #### Returns @@ -41,9 +41,12 @@ A function that **computes and returns** a min/max tuple derived from `column.ge getFacetedRowModel: () => RowModel; ``` -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L17) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L20) -A function that **computes and returns** a row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts. +Computes the row model used to derive this column's facet values. + +Other column filters are applied, while this column's own filter is +excluded. #### Returns @@ -57,9 +60,9 @@ A function that **computes and returns** a row model with all other column filte getFacetedUniqueValues: () => Map; ``` -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L21) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L24) -Returns a `Map` of unique values and their occurrences derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. +Computes unique facet values and occurrence counts for this column. #### Returns diff --git a/docs/reference/index/interfaces/Column_ColumnFiltering.md b/docs/reference/index/interfaces/Column_ColumnFiltering.md index 6370e2c50c..3caf446aeb 100644 --- a/docs/reference/index/interfaces/Column_ColumnFiltering.md +++ b/docs/reference/index/interfaces/Column_ColumnFiltering.md @@ -5,7 +5,7 @@ title: Column_ColumnFiltering # Interface: Column\_ColumnFiltering\ -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L95) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L98) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/column-filtering/columnFilteringFeature.types.ts:95](https getAutoFilterFn: () => FilterFn; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L102) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L105) Returns an automatically calculated filter function for the column based off of the columns first known value. @@ -41,9 +41,9 @@ Returns an automatically calculated filter function for the column based off of getCanFilter: () => boolean; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L106) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L109) -Returns whether or not the column can be **column** filtered. +Checks whether this accessor column can currently be column-filtered. #### Returns @@ -57,7 +57,7 @@ Returns whether or not the column can be **column** filtered. getFilterFn: () => FilterFn; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:110](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L110) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L113) Returns the filter function (either user-defined or automatic, depending on configuration) for the columnId specified. @@ -73,7 +73,7 @@ Returns the filter function (either user-defined or automatic, depending on conf getFilterIndex: () => number; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:114](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L114) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L117) Returns the index (including `-1`) of the column filter in the table's `state.columnFilters` array. @@ -89,9 +89,9 @@ Returns the index (including `-1`) of the column filter in the table's `state.co getFilterValue: () => unknown; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L118) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L121) -Returns the current filter value for the column. +Reads this column's current value from `state.columnFilters`. #### Returns @@ -105,9 +105,9 @@ Returns the current filter value for the column. getIsFiltered: () => boolean; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L122) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:125](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L125) -Returns whether or not the column is currently filtered. +Checks whether this column has an active entry in `state.columnFilters`. #### Returns @@ -121,9 +121,12 @@ Returns whether or not the column is currently filtered. setFilterValue: (updater) => void; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L126) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:132](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L132) -A function that sets the current filter value for the column. You can pass it a value or an updater function for immutability-safe operations on existing values. +Adds, updates, or removes this column's filter value. + +Updater functions receive the previous filter value. Values that satisfy +the filter function's `autoRemove` rule are removed from filter state. #### Parameters diff --git a/docs/reference/index/interfaces/Column_ColumnGrouping.md b/docs/reference/index/interfaces/Column_ColumnGrouping.md index e7aef8f88b..91e96b0ba3 100644 --- a/docs/reference/index/interfaces/Column_ColumnGrouping.md +++ b/docs/reference/index/interfaces/Column_ColumnGrouping.md @@ -5,7 +5,7 @@ title: Column_ColumnGrouping # Interface: Column\_ColumnGrouping\ -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L78) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L80) ## Type Parameters @@ -27,7 +27,7 @@ getAggregationFn: () => | undefined; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L85) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L87) Returns the aggregation function for the column. @@ -46,7 +46,7 @@ getAutoAggregationFn: () => | undefined; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L89) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L91) Returns the automatically inferred aggregation function for the column. @@ -63,9 +63,9 @@ Returns the automatically inferred aggregation function for the column. getCanGroup: () => boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L93) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L95) -Returns whether or not the column can be grouped. +Checks whether this column can currently be grouped. #### Returns @@ -79,9 +79,9 @@ Returns whether or not the column can be grouped. getGroupedIndex: () => number; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L97) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L99) -Returns the index of the column in the grouping state. +Finds this column's position in the ordered grouping state. #### Returns @@ -95,9 +95,9 @@ Returns the index of the column in the grouping state. getIsGrouped: () => boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L101) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:103](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L103) -Returns whether or not the column is currently grouped. +Checks whether this column id is present in grouping state. #### Returns @@ -111,7 +111,7 @@ Returns whether or not the column is currently grouped. getToggleGroupingHandler: () => () => void; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L105) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:107](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L107) Returns a function that toggles the grouping state of the column. This is useful for passing to the `onClick` prop of a button. @@ -133,7 +133,7 @@ Returns a function that toggles the grouping state of the column. This is useful toggleGrouping: () => void; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L109) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:111](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L111) Toggles the grouping state of the column. diff --git a/docs/reference/index/interfaces/Column_ColumnOrdering.md b/docs/reference/index/interfaces/Column_ColumnOrdering.md index ee813495a2..eda2a1655a 100644 --- a/docs/reference/index/interfaces/Column_ColumnOrdering.md +++ b/docs/reference/index/interfaces/Column_ColumnOrdering.md @@ -15,9 +15,12 @@ Defined in: [features/column-ordering/columnOrderingFeature.types.ts:20](https:/ getIndex: (position?) => number; ``` -Defined in: [features/column-ordering/columnOrderingFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L24) +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L27) -Returns the index of the column in the order of the visible columns. Optionally pass a `position` parameter to get the index of the column in a sub-section of the table +Finds this column's zero-based index among visible columns. + +Pass `'left'`, `'center'`, or `'right'` to measure within that pinned +region instead of the full visible leaf order. #### Parameters @@ -37,9 +40,11 @@ Returns the index of the column in the order of the visible columns. Optionally getIsFirstColumn: (position?) => boolean; ``` -Defined in: [features/column-ordering/columnOrderingFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L28) +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L33) + +Checks whether this column is the first visible column. -Returns `true` if the column is the first column in the order of the visible columns. Optionally pass a `position` parameter to check if the column is the first in a sub-section of the table. +Pass a pinned region to check the first column within that region. #### Parameters @@ -59,9 +64,11 @@ Returns `true` if the column is the first column in the order of the visible col getIsLastColumn: (position?) => boolean; ``` -Defined in: [features/column-ordering/columnOrderingFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L32) +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L39) + +Checks whether this column is the last visible column. -Returns `true` if the column is the last column in the order of the visible columns. Optionally pass a `position` parameter to check if the column is the last in a sub-section of the table. +Pass a pinned region to check the last column within that region. #### Parameters diff --git a/docs/reference/index/interfaces/Column_ColumnPinning.md b/docs/reference/index/interfaces/Column_ColumnPinning.md index d9d361eaab..f8e0835d22 100644 --- a/docs/reference/index/interfaces/Column_ColumnPinning.md +++ b/docs/reference/index/interfaces/Column_ColumnPinning.md @@ -5,7 +5,7 @@ title: Column_ColumnPinning # Interface: Column\_ColumnPinning -Defined in: [features/column-pinning/columnPinningFeature.types.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L43) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L49) ## Properties @@ -15,9 +15,9 @@ Defined in: [features/column-pinning/columnPinningFeature.types.ts:43](https://g getCanPin: () => boolean; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L47) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L53) -Returns whether or not the column can be pinned. +Checks whether this column or any of its leaves can be pinned. #### Returns @@ -31,9 +31,9 @@ Returns whether or not the column can be pinned. getIsPinned: () => ColumnPinningPosition; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L51) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L57) -Returns the pinned position of the column. (`'left'`, `'right'` or `false`) +Reads the column's pinned position: `'left'`, `'right'`, or `false`. #### Returns @@ -47,9 +47,9 @@ Returns the pinned position of the column. (`'left'`, `'right'` or `false`) getPinnedIndex: () => number; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L55) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L61) -Returns the numeric pinned index of the column within a pinned column group. +Finds this column's index within its pinned region. #### Returns @@ -63,9 +63,10 @@ Returns the numeric pinned index of the column within a pinned column group. pin: (position) => void; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L59) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L66) -Pins a column to the `'left'` or `'right'`, or unpins the column to the center if `false` is passed. +Pins this column's leaf columns left or right, or unpins them when `false` +is passed. #### Parameters diff --git a/docs/reference/index/interfaces/Column_ColumnResizing.md b/docs/reference/index/interfaces/Column_ColumnResizing.md index be0c59f8eb..3f5cdf9b3b 100644 --- a/docs/reference/index/interfaces/Column_ColumnResizing.md +++ b/docs/reference/index/interfaces/Column_ColumnResizing.md @@ -5,7 +5,7 @@ title: Column_ColumnResizing # Interface: Column\_ColumnResizing -Defined in: [features/column-resizing/columnResizingFeature.types.ts:70](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L70) +Defined in: [features/column-resizing/columnResizingFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L71) ## Properties @@ -15,9 +15,9 @@ Defined in: [features/column-resizing/columnResizingFeature.types.ts:70](https:/ getCanResize: () => boolean; ``` -Defined in: [features/column-resizing/columnResizingFeature.types.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L74) +Defined in: [features/column-resizing/columnResizingFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L75) -Returns `true` if the column can be resized. +Checks whether this column can start a resize interaction. #### Returns @@ -31,9 +31,9 @@ Returns `true` if the column can be resized. getIsResizing: () => boolean; ``` -Defined in: [features/column-resizing/columnResizingFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L78) +Defined in: [features/column-resizing/columnResizingFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L79) -Returns `true` if the column is currently being resized. +Checks whether this column is the active resize target. #### Returns diff --git a/docs/reference/index/interfaces/Column_ColumnSizing.md b/docs/reference/index/interfaces/Column_ColumnSizing.md index 6bdbaf1f0a..b8c131c085 100644 --- a/docs/reference/index/interfaces/Column_ColumnSizing.md +++ b/docs/reference/index/interfaces/Column_ColumnSizing.md @@ -15,9 +15,12 @@ Defined in: [features/column-sizing/columnSizingFeature.types.ts:67](https://git getAfter: (position?) => number; ``` -Defined in: [features/column-sizing/columnSizingFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L71) +Defined in: [features/column-sizing/columnSizingFeature.types.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L74) -Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all succeeding (right) headers in relation to the current column. +Measures the offset from this column's end edge to the end of its region. + +Pass a pinned region to measure within that region. The value is the sum +of visible leaf column sizes after this column. #### Parameters @@ -37,9 +40,9 @@ Returns the offset measurement along the row-axis (usually the x-axis for standa getSize: () => number; ``` -Defined in: [features/column-sizing/columnSizingFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L75) +Defined in: [features/column-sizing/columnSizingFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L78) -Returns the current size of the column. +Resolves the column's current size after state and min/max constraints. #### Returns @@ -53,9 +56,13 @@ Returns the current size of the column. getStart: (position?) => number; ``` -Defined in: [features/column-sizing/columnSizingFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L79) +Defined in: [features/column-sizing/columnSizingFeature.types.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L86) + +Measures the offset from the start of this column's region to its start +edge. -Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding (left) headers in relation to the current column. +Pass a pinned region to measure within that region. The value is the sum +of visible leaf column sizes before this column. #### Parameters @@ -75,7 +82,7 @@ Returns the offset measurement along the row-axis (usually the x-axis for standa resetSize: () => void; ``` -Defined in: [features/column-sizing/columnSizingFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L83) +Defined in: [features/column-sizing/columnSizingFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L90) Resets the column to its initial size. diff --git a/docs/reference/index/interfaces/Column_ColumnVisibility.md b/docs/reference/index/interfaces/Column_ColumnVisibility.md index e126fe381d..044f2156bd 100644 --- a/docs/reference/index/interfaces/Column_ColumnVisibility.md +++ b/docs/reference/index/interfaces/Column_ColumnVisibility.md @@ -5,7 +5,7 @@ title: Column_ColumnVisibility # Interface: Column\_ColumnVisibility -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L92) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L95) ## Properties @@ -15,9 +15,9 @@ Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:92](htt getCanHide: () => boolean; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L96) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L99) -Returns whether the column can be hidden +Checks whether this column is allowed to be hidden. #### Returns @@ -31,9 +31,9 @@ Returns whether the column can be hidden getIsVisible: () => boolean; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L100) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:103](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L103) -Returns whether the column is visible +Checks whether this column is currently visible. #### Returns @@ -47,9 +47,9 @@ Returns whether the column is visible getToggleVisibilityHandler: () => (event) => void; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L104) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:107](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L107) -Returns a function that can be used to toggle the column visibility. This function can be used to bind to an event handler to a checkbox. +Creates a checkbox-style handler that toggles this column's visibility. #### Returns @@ -75,7 +75,7 @@ Returns a function that can be used to toggle the column visibility. This functi toggleVisibility: (value?) => void; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L108) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:111](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L111) Toggles the visibility of the column. diff --git a/docs/reference/index/interfaces/Column_Core.md b/docs/reference/index/interfaces/Column_Core.md index 19778f5f47..56eb76c1ab 100644 --- a/docs/reference/index/interfaces/Column_Core.md +++ b/docs/reference/index/interfaces/Column_Core.md @@ -99,7 +99,7 @@ getFlatColumns: () => Column[]; Defined in: [core/columns/coreColumnsFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L53) -Returns the flattened array of this column and all child/grand-child columns for this column. +Flattens this column and every descendant column into a single array. #### Returns @@ -117,9 +117,10 @@ Returns the flattened array of this column and all child/grand-child columns for getLeafColumns: () => Column[]; ``` -Defined in: [core/columns/coreColumnsFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L57) +Defined in: [core/columns/coreColumnsFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L58) -Returns an array of all leaf-node columns for this column. If a column has no children, it is considered the only leaf-node column. +Collects the terminal leaf columns below this column, or the column itself +when it has no children. #### Returns diff --git a/docs/reference/index/interfaces/Column_GlobalFiltering.md b/docs/reference/index/interfaces/Column_GlobalFiltering.md index 2f0e9d98b7..8261ae0607 100644 --- a/docs/reference/index/interfaces/Column_GlobalFiltering.md +++ b/docs/reference/index/interfaces/Column_GlobalFiltering.md @@ -5,7 +5,7 @@ title: Column_GlobalFiltering # Interface: Column\_GlobalFiltering -Defined in: [features/global-filtering/globalFilteringFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L25) +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L28) ## Properties @@ -15,9 +15,9 @@ Defined in: [features/global-filtering/globalFilteringFeature.types.ts:25](https getCanGlobalFilter: () => boolean; ``` -Defined in: [features/global-filtering/globalFilteringFeature.types.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L29) +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L32) -Returns whether or not the column can be **globally** filtered. Set to `false` to disable a column from being scanned during global filtering. +Checks whether this accessor column participates in global filtering. #### Returns diff --git a/docs/reference/index/interfaces/Column_RowSorting.md b/docs/reference/index/interfaces/Column_RowSorting.md index 52460eb9af..b28f4e09b1 100644 --- a/docs/reference/index/interfaces/Column_RowSorting.md +++ b/docs/reference/index/interfaces/Column_RowSorting.md @@ -123,7 +123,7 @@ getIsSorted: () => false | SortDirection; Defined in: [features/row-sorting/rowSortingFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L120) -Returns the current sort direction of this column. +Reads this column's current sort direction, or `false` when unsorted. #### Returns @@ -171,7 +171,7 @@ getSortIndex: () => number; Defined in: [features/row-sorting/rowSortingFeature.types.ts:128](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L128) -Returns the index position of this column's sorting within the sorting state +Finds this column's position in the ordered sorting state. #### Returns @@ -187,7 +187,7 @@ getToggleSortingHandler: () => (event) => void | undefined; Defined in: [features/row-sorting/rowSortingFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L136) -Returns a function that can be used to toggle this column's sorting state. This is useful for attaching a click handler to the column header. +Creates a header/control handler that toggles this column's sorting state. #### Returns diff --git a/docs/reference/index/interfaces/CreateRowModel_Expanded.md b/docs/reference/index/interfaces/CreateRowModel_Expanded.md index 9459d0a031..df7078517c 100644 --- a/docs/reference/index/interfaces/CreateRowModel_Expanded.md +++ b/docs/reference/index/interfaces/CreateRowModel_Expanded.md @@ -5,7 +5,7 @@ title: CreateRowModel_Expanded # Interface: CreateRowModel\_Expanded\ -Defined in: [features/row-expanding/rowExpandingFeature.types.ts:127](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L127) +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:128](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L128) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/row-expanding/rowExpandingFeature.types.ts:127](https://gi optional expandedRowModel: (table) => () => RowModel; ``` -Defined in: [features/row-expanding/rowExpandingFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L136) +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:137](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L137) Factory used to retrieve the expanded row model. If this function is not provided, the table will not expand rows. To use client-side expansion, diff --git a/docs/reference/index/interfaces/CreateRowModel_Faceted.md b/docs/reference/index/interfaces/CreateRowModel_Faceted.md index 0720f2d497..9ea998e0ce 100644 --- a/docs/reference/index/interfaces/CreateRowModel_Faceted.md +++ b/docs/reference/index/interfaces/CreateRowModel_Faceted.md @@ -5,7 +5,7 @@ title: CreateRowModel_Faceted # Interface: CreateRowModel\_Faceted\ -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L45) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L51) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/column-faceting/columnFacetingFeature.types.ts:45](https:/ optional facetedMinMaxValues: (table, columnId) => () => [number, number] | undefined; ``` -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L54) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L60) Factory used to retrieve faceted min/max values. If using server-side faceting, this is not required. To use client-side faceting, pass @@ -59,7 +59,7 @@ faceting, this is not required. To use client-side faceting, pass optional facetedRowModel: (table, columnId) => () => RowModel; ``` -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L63) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L69) Factory used to retrieve the faceted row model. If using server-side faceting, this is not required. To use client-side faceting, pass @@ -93,7 +93,7 @@ faceting, this is not required. To use client-side faceting, pass optional facetedUniqueValues: (table, columnId) => () => Map; ``` -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L72) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L78) Factory used to retrieve faceted unique values. If using server-side faceting, this is not required. To use client-side faceting, pass diff --git a/docs/reference/index/interfaces/CreateRowModel_Filtered.md b/docs/reference/index/interfaces/CreateRowModel_Filtered.md index 5e3b9d0d66..b04f9ec8b9 100644 --- a/docs/reference/index/interfaces/CreateRowModel_Filtered.md +++ b/docs/reference/index/interfaces/CreateRowModel_Filtered.md @@ -5,7 +5,7 @@ title: CreateRowModel_Filtered # Interface: CreateRowModel\_Filtered\ -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:202](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L202) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:212](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L212) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/column-filtering/columnFilteringFeature.types.ts:202](http optional filteredRowModel: (table) => () => RowModel; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:212](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L212) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:222](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L222) If provided, this factory is called once per table and should return a function that calculates the filtered row model. diff --git a/docs/reference/index/interfaces/CreateRowModel_Grouped.md b/docs/reference/index/interfaces/CreateRowModel_Grouped.md index 3ca42a191d..529a5ba277 100644 --- a/docs/reference/index/interfaces/CreateRowModel_Grouped.md +++ b/docs/reference/index/interfaces/CreateRowModel_Grouped.md @@ -5,7 +5,7 @@ title: CreateRowModel_Grouped # Interface: CreateRowModel\_Grouped\ -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:203](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L203) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:207](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L207) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/column-grouping/columnGroupingFeature.types.ts:203](https: optional groupedRowModel: (table) => () => RowModel; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:212](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L212) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:216](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L216) Factory used to retrieve the grouped row model. If using server-side grouping, this is not required. To use client-side grouping, pass diff --git a/docs/reference/index/interfaces/CreateRowModel_Paginated.md b/docs/reference/index/interfaces/CreateRowModel_Paginated.md index 3d6046cadb..a76f3bed83 100644 --- a/docs/reference/index/interfaces/CreateRowModel_Paginated.md +++ b/docs/reference/index/interfaces/CreateRowModel_Paginated.md @@ -5,7 +5,7 @@ title: CreateRowModel_Paginated # Interface: CreateRowModel\_Paginated\ -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L126) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:133](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L133) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/row-pagination/rowPaginationFeature.types.ts:126](https:// optional paginatedRowModel: (table) => () => RowModel; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:135](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L135) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:142](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L142) Factory used to retrieve the paginated row model. If using server-side pagination, this is not required. To use client-side pagination, pass diff --git a/docs/reference/index/interfaces/CreateRowModel_Sorted.md b/docs/reference/index/interfaces/CreateRowModel_Sorted.md index 75b1439e5b..ca5b11453f 100644 --- a/docs/reference/index/interfaces/CreateRowModel_Sorted.md +++ b/docs/reference/index/interfaces/CreateRowModel_Sorted.md @@ -5,7 +5,7 @@ title: CreateRowModel_Sorted # Interface: CreateRowModel\_Sorted\ -Defined in: [features/row-sorting/rowSortingFeature.types.ts:214](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L214) +Defined in: [features/row-sorting/rowSortingFeature.types.ts:216](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L216) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/row-sorting/rowSortingFeature.types.ts:214](https://github optional sortedRowModel: (table) => () => RowModel; ``` -Defined in: [features/row-sorting/rowSortingFeature.types.ts:223](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L223) +Defined in: [features/row-sorting/rowSortingFeature.types.ts:225](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L225) Factory used to retrieve the sorted row model. If using server-side sorting, this is not required. To use client-side sorting, pass the diff --git a/docs/reference/index/interfaces/HeaderContext.md b/docs/reference/index/interfaces/HeaderContext.md index 20f0236561..5465b6dc56 100644 --- a/docs/reference/index/interfaces/HeaderContext.md +++ b/docs/reference/index/interfaces/HeaderContext.md @@ -5,7 +5,7 @@ title: HeaderContext # Interface: HeaderContext\ -Defined in: [core/headers/coreHeadersFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L30) +Defined in: [core/headers/coreHeadersFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L32) ## Type Parameters @@ -29,7 +29,7 @@ Defined in: [core/headers/coreHeadersFeature.types.ts:30](https://github.com/Tan column: Column; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L38) +Defined in: [core/headers/coreHeadersFeature.types.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L40) An instance of a column. @@ -41,7 +41,7 @@ An instance of a column. header: Header; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L42) +Defined in: [core/headers/coreHeadersFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L44) An instance of a header. @@ -53,6 +53,6 @@ An instance of a header. table: Table; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L46) +Defined in: [core/headers/coreHeadersFeature.types.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L48) The table instance. diff --git a/docs/reference/index/interfaces/HeaderGroup_Core.md b/docs/reference/index/interfaces/HeaderGroup_Core.md index 99cf395801..c96bf83855 100644 --- a/docs/reference/index/interfaces/HeaderGroup_Core.md +++ b/docs/reference/index/interfaces/HeaderGroup_Core.md @@ -29,7 +29,7 @@ Defined in: [types/HeaderGroup.ts:14](https://github.com/TanStack/table/blob/mai depth: number; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L120) +Defined in: [core/headers/coreHeadersFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L122) #### Inherited from @@ -43,7 +43,7 @@ Defined in: [core/headers/coreHeadersFeature.types.ts:120](https://github.com/Ta headers: Header[]; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L121) +Defined in: [core/headers/coreHeadersFeature.types.ts:123](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L123) #### Inherited from @@ -57,7 +57,7 @@ Defined in: [core/headers/coreHeadersFeature.types.ts:121](https://github.com/Ta id: string; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L122) +Defined in: [core/headers/coreHeadersFeature.types.ts:124](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L124) #### Inherited from diff --git a/docs/reference/index/interfaces/HeaderGroup_Header.md b/docs/reference/index/interfaces/HeaderGroup_Header.md index 5bd51a846d..4262ffe1e9 100644 --- a/docs/reference/index/interfaces/HeaderGroup_Header.md +++ b/docs/reference/index/interfaces/HeaderGroup_Header.md @@ -5,7 +5,7 @@ title: HeaderGroup_Header # Interface: HeaderGroup\_Header\ -Defined in: [core/headers/coreHeadersFeature.types.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L115) +Defined in: [core/headers/coreHeadersFeature.types.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L117) ## Extended by @@ -33,7 +33,7 @@ Defined in: [core/headers/coreHeadersFeature.types.ts:115](https://github.com/Ta depth: number; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L120) +Defined in: [core/headers/coreHeadersFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L122) *** @@ -43,7 +43,7 @@ Defined in: [core/headers/coreHeadersFeature.types.ts:120](https://github.com/Ta headers: Header[]; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L121) +Defined in: [core/headers/coreHeadersFeature.types.ts:123](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L123) *** @@ -53,4 +53,4 @@ Defined in: [core/headers/coreHeadersFeature.types.ts:121](https://github.com/Ta id: string; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L122) +Defined in: [core/headers/coreHeadersFeature.types.ts:124](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L124) diff --git a/docs/reference/index/interfaces/Header_ColumnResizing.md b/docs/reference/index/interfaces/Header_ColumnResizing.md index 2833f9b667..4a5a191b6a 100644 --- a/docs/reference/index/interfaces/Header_ColumnResizing.md +++ b/docs/reference/index/interfaces/Header_ColumnResizing.md @@ -5,7 +5,7 @@ title: Header_ColumnResizing # Interface: Header\_ColumnResizing -Defined in: [features/column-resizing/columnResizingFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L81) +Defined in: [features/column-resizing/columnResizingFeature.types.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L82) ## Properties @@ -17,10 +17,9 @@ getResizeHandler: (context?) => (event) => void; Defined in: [features/column-resizing/columnResizingFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L88) -Returns an event handler function that can be used to resize the header. It can be used as an: -- `onMouseDown` handler -- `onTouchStart` handler -The dragging and release events are automatically handled for you. +Creates the `onMouseDown`/`onTouchStart` handler for a resize handle. + +Dragging and release listeners are installed and cleaned up automatically. #### Parameters diff --git a/docs/reference/index/interfaces/Header_ColumnSizing.md b/docs/reference/index/interfaces/Header_ColumnSizing.md index 59bd2e239c..60598ddd20 100644 --- a/docs/reference/index/interfaces/Header_ColumnSizing.md +++ b/docs/reference/index/interfaces/Header_ColumnSizing.md @@ -5,7 +5,7 @@ title: Header_ColumnSizing # Interface: Header\_ColumnSizing -Defined in: [features/column-sizing/columnSizingFeature.types.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L86) +Defined in: [features/column-sizing/columnSizingFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L93) ## Properties @@ -15,9 +15,9 @@ Defined in: [features/column-sizing/columnSizingFeature.types.ts:86](https://git getSize: () => number; ``` -Defined in: [features/column-sizing/columnSizingFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L90) +Defined in: [features/column-sizing/columnSizingFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L97) -Returns the current size of the header. +Computes this header's rendered size from its leaf columns. #### Returns @@ -31,7 +31,7 @@ Returns the current size of the header. getStart: (position?) => number; ``` -Defined in: [features/column-sizing/columnSizingFeature.types.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L94) +Defined in: [features/column-sizing/columnSizingFeature.types.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L101) Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding headers. diff --git a/docs/reference/index/interfaces/Header_Core.md b/docs/reference/index/interfaces/Header_Core.md index fd4980f9ba..57ead494d4 100644 --- a/docs/reference/index/interfaces/Header_Core.md +++ b/docs/reference/index/interfaces/Header_Core.md @@ -33,7 +33,7 @@ Defined in: [types/Header.ts:17](https://github.com/TanStack/table/blob/main/pac colSpan: number; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L57) +Defined in: [core/headers/coreHeadersFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L59) The col-span for the header. @@ -49,7 +49,7 @@ The col-span for the header. column: Column; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L61) +Defined in: [core/headers/coreHeadersFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L63) The header's associated column object. @@ -65,7 +65,7 @@ The header's associated column object. depth: number; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L65) +Defined in: [core/headers/coreHeadersFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L67) The depth of the header, zero-indexed based. @@ -81,7 +81,7 @@ The depth of the header, zero-indexed based. getContext: () => HeaderContext; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L108) +Defined in: [core/headers/coreHeadersFeature.types.ts:110](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L110) Returns the rendering context (or props) for column-based components like headers, footers and filters. @@ -101,7 +101,7 @@ Returns the rendering context (or props) for column-based components like header getLeafHeaders: () => Header[]; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L112) +Defined in: [core/headers/coreHeadersFeature.types.ts:114](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L114) Returns the leaf headers hierarchically nested under this header. @@ -123,7 +123,7 @@ headerGroup: | null; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L69) +Defined in: [core/headers/coreHeadersFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L71) The header's associated header group object. @@ -139,7 +139,7 @@ The header's associated header group object. id: string; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L73) +Defined in: [core/headers/coreHeadersFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L75) The unique identifier for the header. @@ -155,7 +155,7 @@ The unique identifier for the header. index: number; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L77) +Defined in: [core/headers/coreHeadersFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L79) The index for the header within the header group. @@ -171,7 +171,7 @@ The index for the header within the header group. isPlaceholder: boolean; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L81) +Defined in: [core/headers/coreHeadersFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L83) A boolean denoting if the header is a placeholder header. @@ -187,7 +187,7 @@ A boolean denoting if the header is a placeholder header. optional placeholderId: string; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L85) +Defined in: [core/headers/coreHeadersFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L87) If the header is a placeholder header, this will be a unique header ID that does not conflict with any other headers across the table. @@ -203,7 +203,7 @@ If the header is a placeholder header, this will be a unique header ID that does rowSpan: number; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L89) +Defined in: [core/headers/coreHeadersFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L91) The row-span for the header. @@ -219,7 +219,7 @@ The row-span for the header. subHeaders: Header[]; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L93) +Defined in: [core/headers/coreHeadersFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L95) The header's hierarchical sub/child headers. Will be empty if the header's associated column is a leaf-column. @@ -235,7 +235,7 @@ The header's hierarchical sub/child headers. Will be empty if the header's assoc table: Table; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L97) +Defined in: [core/headers/coreHeadersFeature.types.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L99) Reference to the parent table instance. diff --git a/docs/reference/index/interfaces/Header_CoreProperties.md b/docs/reference/index/interfaces/Header_CoreProperties.md index c9510471c6..30083cd084 100644 --- a/docs/reference/index/interfaces/Header_CoreProperties.md +++ b/docs/reference/index/interfaces/Header_CoreProperties.md @@ -5,7 +5,7 @@ title: Header_CoreProperties # Interface: Header\_CoreProperties\ -Defined in: [core/headers/coreHeadersFeature.types.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L49) +Defined in: [core/headers/coreHeadersFeature.types.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L51) ## Extended by @@ -33,7 +33,7 @@ Defined in: [core/headers/coreHeadersFeature.types.ts:49](https://github.com/Tan colSpan: number; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L57) +Defined in: [core/headers/coreHeadersFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L59) The col-span for the header. @@ -45,7 +45,7 @@ The col-span for the header. column: Column; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L61) +Defined in: [core/headers/coreHeadersFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L63) The header's associated column object. @@ -57,7 +57,7 @@ The header's associated column object. depth: number; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L65) +Defined in: [core/headers/coreHeadersFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L67) The depth of the header, zero-indexed based. @@ -71,7 +71,7 @@ headerGroup: | null; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L69) +Defined in: [core/headers/coreHeadersFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L71) The header's associated header group object. @@ -83,7 +83,7 @@ The header's associated header group object. id: string; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L73) +Defined in: [core/headers/coreHeadersFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L75) The unique identifier for the header. @@ -95,7 +95,7 @@ The unique identifier for the header. index: number; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L77) +Defined in: [core/headers/coreHeadersFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L79) The index for the header within the header group. @@ -107,7 +107,7 @@ The index for the header within the header group. isPlaceholder: boolean; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L81) +Defined in: [core/headers/coreHeadersFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L83) A boolean denoting if the header is a placeholder header. @@ -119,7 +119,7 @@ A boolean denoting if the header is a placeholder header. optional placeholderId: string; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L85) +Defined in: [core/headers/coreHeadersFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L87) If the header is a placeholder header, this will be a unique header ID that does not conflict with any other headers across the table. @@ -131,7 +131,7 @@ If the header is a placeholder header, this will be a unique header ID that does rowSpan: number; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L89) +Defined in: [core/headers/coreHeadersFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L91) The row-span for the header. @@ -143,7 +143,7 @@ The row-span for the header. subHeaders: Header[]; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L93) +Defined in: [core/headers/coreHeadersFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L95) The header's hierarchical sub/child headers. Will be empty if the header's associated column is a leaf-column. @@ -155,6 +155,6 @@ The header's hierarchical sub/child headers. Will be empty if the header's assoc table: Table; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L97) +Defined in: [core/headers/coreHeadersFeature.types.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L99) Reference to the parent table instance. diff --git a/docs/reference/index/interfaces/Header_Header.md b/docs/reference/index/interfaces/Header_Header.md index ce794fb2bb..527d8e7bf9 100644 --- a/docs/reference/index/interfaces/Header_Header.md +++ b/docs/reference/index/interfaces/Header_Header.md @@ -5,7 +5,7 @@ title: Header_Header # Interface: Header\_Header\ -Defined in: [core/headers/coreHeadersFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L100) +Defined in: [core/headers/coreHeadersFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L102) ## Extends @@ -37,7 +37,7 @@ Defined in: [core/headers/coreHeadersFeature.types.ts:100](https://github.com/Ta colSpan: number; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L57) +Defined in: [core/headers/coreHeadersFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L59) The col-span for the header. @@ -53,7 +53,7 @@ The col-span for the header. column: Column; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L61) +Defined in: [core/headers/coreHeadersFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L63) The header's associated column object. @@ -69,7 +69,7 @@ The header's associated column object. depth: number; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L65) +Defined in: [core/headers/coreHeadersFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L67) The depth of the header, zero-indexed based. @@ -85,7 +85,7 @@ The depth of the header, zero-indexed based. getContext: () => HeaderContext; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L108) +Defined in: [core/headers/coreHeadersFeature.types.ts:110](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L110) Returns the rendering context (or props) for column-based components like headers, footers and filters. @@ -101,7 +101,7 @@ Returns the rendering context (or props) for column-based components like header getLeafHeaders: () => Header[]; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L112) +Defined in: [core/headers/coreHeadersFeature.types.ts:114](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L114) Returns the leaf headers hierarchically nested under this header. @@ -119,7 +119,7 @@ headerGroup: | null; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L69) +Defined in: [core/headers/coreHeadersFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L71) The header's associated header group object. @@ -135,7 +135,7 @@ The header's associated header group object. id: string; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L73) +Defined in: [core/headers/coreHeadersFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L75) The unique identifier for the header. @@ -151,7 +151,7 @@ The unique identifier for the header. index: number; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L77) +Defined in: [core/headers/coreHeadersFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L79) The index for the header within the header group. @@ -167,7 +167,7 @@ The index for the header within the header group. isPlaceholder: boolean; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L81) +Defined in: [core/headers/coreHeadersFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L83) A boolean denoting if the header is a placeholder header. @@ -183,7 +183,7 @@ A boolean denoting if the header is a placeholder header. optional placeholderId: string; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L85) +Defined in: [core/headers/coreHeadersFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L87) If the header is a placeholder header, this will be a unique header ID that does not conflict with any other headers across the table. @@ -199,7 +199,7 @@ If the header is a placeholder header, this will be a unique header ID that does rowSpan: number; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L89) +Defined in: [core/headers/coreHeadersFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L91) The row-span for the header. @@ -215,7 +215,7 @@ The row-span for the header. subHeaders: Header[]; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L93) +Defined in: [core/headers/coreHeadersFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L95) The header's hierarchical sub/child headers. Will be empty if the header's associated column is a leaf-column. @@ -231,7 +231,7 @@ The header's hierarchical sub/child headers. Will be empty if the header's assoc table: Table; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L97) +Defined in: [core/headers/coreHeadersFeature.types.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L99) Reference to the parent table instance. diff --git a/docs/reference/index/interfaces/IdIdentifier.md b/docs/reference/index/interfaces/IdIdentifier.md index 49bb4140c3..416ae96ca7 100644 --- a/docs/reference/index/interfaces/IdIdentifier.md +++ b/docs/reference/index/interfaces/IdIdentifier.md @@ -5,7 +5,7 @@ title: IdIdentifier # Interface: IdIdentifier\ -Defined in: [types/ColumnDef.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L50) +Defined in: [types/ColumnDef.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L68) ## Type Parameters @@ -29,7 +29,9 @@ Defined in: [types/ColumnDef.ts:50](https://github.com/TanStack/table/blob/main/ optional header: ColumnDefTemplate>; ``` -Defined in: [types/ColumnDef.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L56) +Defined in: [types/ColumnDef.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L80) + +Header text or template used to render this column's header. *** @@ -39,4 +41,6 @@ Defined in: [types/ColumnDef.ts:56](https://github.com/TanStack/table/blob/main/ id: string; ``` -Defined in: [types/ColumnDef.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L55) +Defined in: [types/ColumnDef.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L76) + +Explicit stable column id. diff --git a/docs/reference/index/interfaces/RowPinningDefaultOptions.md b/docs/reference/index/interfaces/RowPinningDefaultOptions.md index ac7f1f49a1..50ff7b3aa6 100644 --- a/docs/reference/index/interfaces/RowPinningDefaultOptions.md +++ b/docs/reference/index/interfaces/RowPinningDefaultOptions.md @@ -5,7 +5,7 @@ title: RowPinningDefaultOptions # Interface: RowPinningDefaultOptions -Defined in: [features/row-pinning/rowPinningFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L36) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L38) ## Properties @@ -15,4 +15,4 @@ Defined in: [features/row-pinning/rowPinningFeature.types.ts:36](https://github. onRowPinningChange: OnChangeFn; ``` -Defined in: [features/row-pinning/rowPinningFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L37) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L39) diff --git a/docs/reference/index/interfaces/Row_ColumnFiltering.md b/docs/reference/index/interfaces/Row_ColumnFiltering.md index 8e1e31304b..f5e3cefadb 100644 --- a/docs/reference/index/interfaces/Row_ColumnFiltering.md +++ b/docs/reference/index/interfaces/Row_ColumnFiltering.md @@ -5,7 +5,7 @@ title: Row_ColumnFiltering # Interface: Row\_ColumnFiltering\ -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:129](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L129) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:135](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L135) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/column-filtering/columnFilteringFeature.types.ts:129](http columnFilters: Record; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L136) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:142](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L142) The column filters map for the row. This object tracks whether a row is passing/failing specific filters by their column ID. @@ -37,6 +37,6 @@ The column filters map for the row. This object tracks whether a row is passing/ columnFiltersMeta: Record; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L140) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:146](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L146) The column filters meta map for the row. This object tracks any filter meta for a row as optionally provided during the filtering process. diff --git a/docs/reference/index/interfaces/Row_ColumnGrouping.md b/docs/reference/index/interfaces/Row_ColumnGrouping.md index b49d60f8ce..5264d5e401 100644 --- a/docs/reference/index/interfaces/Row_ColumnGrouping.md +++ b/docs/reference/index/interfaces/Row_ColumnGrouping.md @@ -5,7 +5,7 @@ title: Row_ColumnGrouping # Interface: Row\_ColumnGrouping -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L112) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:114](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L114) ## Properties @@ -15,7 +15,7 @@ Defined in: [features/column-grouping/columnGroupingFeature.types.ts:112](https: _groupingValuesCache: Record; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L113) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L115) *** @@ -25,9 +25,9 @@ Defined in: [features/column-grouping/columnGroupingFeature.types.ts:113](https: getGroupingValue: (columnId) => unknown; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L117) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L119) -Returns the grouping value for any row and column (including leaf rows). +Reads the value used to group this row for a column id. #### Parameters @@ -47,9 +47,9 @@ Returns the grouping value for any row and column (including leaf rows). getIsGrouped: () => boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L121) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:123](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L123) -Returns whether or not the row is currently grouped. +Checks whether this row represents a grouped row. #### Returns @@ -63,7 +63,7 @@ Returns whether or not the row is currently grouped. optional groupingColumnId: string; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:125](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L125) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:127](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L127) If this row is grouped, this is the id of the column that this row is grouped by. @@ -75,6 +75,6 @@ If this row is grouped, this is the id of the column that this row is grouped by optional groupingValue: unknown; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:129](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L129) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:131](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L131) If this row is grouped, this is the unique/shared value for the `groupingColumnId` for all of the rows in this group. diff --git a/docs/reference/index/interfaces/Row_ColumnPinning.md b/docs/reference/index/interfaces/Row_ColumnPinning.md index 084e3fbcd7..39bb6e8ce5 100644 --- a/docs/reference/index/interfaces/Row_ColumnPinning.md +++ b/docs/reference/index/interfaces/Row_ColumnPinning.md @@ -5,7 +5,7 @@ title: Row_ColumnPinning # Interface: Row\_ColumnPinning\ -Defined in: [features/column-pinning/columnPinningFeature.types.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L62) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L69) ## Type Parameters @@ -25,9 +25,9 @@ Defined in: [features/column-pinning/columnPinningFeature.types.ts:62](https://g getCenterVisibleCells: () => Cell[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L69) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L76) -Returns all center pinned (unpinned) leaf cells in the row. +Gets visible row cells whose columns are not pinned left or right. #### Returns @@ -41,9 +41,9 @@ Returns all center pinned (unpinned) leaf cells in the row. getLeftVisibleCells: () => Cell[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L73) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L80) -Returns all left pinned leaf cells in the row. +Gets visible row cells whose columns are pinned left. #### Returns @@ -57,9 +57,9 @@ Returns all left pinned leaf cells in the row. getRightVisibleCells: () => Cell[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L77) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L84) -Returns all right pinned leaf cells in the row. +Gets visible row cells whose columns are pinned right. #### Returns diff --git a/docs/reference/index/interfaces/Row_ColumnVisibility.md b/docs/reference/index/interfaces/Row_ColumnVisibility.md index a9537b1b4b..70c98438ab 100644 --- a/docs/reference/index/interfaces/Row_ColumnVisibility.md +++ b/docs/reference/index/interfaces/Row_ColumnVisibility.md @@ -5,7 +5,7 @@ title: Row_ColumnVisibility # Interface: Row\_ColumnVisibility\ -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L75) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L78) ## Type Parameters @@ -25,9 +25,9 @@ Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:75](htt getVisibleCells: () => Cell[]; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L82) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L85) -Returns an array of cells that account for column visibility for the row. +Gets this row's cells for currently visible columns. #### Returns @@ -41,9 +41,9 @@ Returns an array of cells that account for column visibility for the row. getVisibleCellsByColumnId: () => Record>; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L86) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L89) -Returns visible cells by column id for the row. +Maps this row's currently visible cells by column id. #### Returns diff --git a/docs/reference/index/interfaces/Row_Core.md b/docs/reference/index/interfaces/Row_Core.md index 3510647a32..2881466635 100644 --- a/docs/reference/index/interfaces/Row_Core.md +++ b/docs/reference/index/interfaces/Row_Core.md @@ -75,7 +75,7 @@ getAllCells: () => Cell[]; Defined in: [core/rows/coreRowsFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L58) -Returns all of the cells for the row. +Builds one cell for each leaf column, including cells for hidden columns. #### Returns @@ -95,7 +95,7 @@ getAllCellsByColumnId: () => Record>; Defined in: [core/rows/coreRowsFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L54) -Returns all of the cells for the row by column id. +Builds a lookup of this row's cells keyed by leaf column id. #### Returns @@ -175,7 +175,7 @@ getUniqueValues: (columnId) => TValue[]; Defined in: [core/rows/coreRowsFeature.types.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L74) -Returns a unique array of values from the row for a given columnId. +Reads the values this row contributes to faceting/grouping for a column. #### Type Parameters @@ -207,7 +207,7 @@ getValue: (columnId) => TValue; Defined in: [core/rows/coreRowsFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L78) -Returns the value from the row for a given columnId. +Reads this row's accessor value for a column id and caches the result. #### Type Parameters diff --git a/docs/reference/index/interfaces/Row_Row.md b/docs/reference/index/interfaces/Row_Row.md index 41a6cee4c5..b0b099bd41 100644 --- a/docs/reference/index/interfaces/Row_Row.md +++ b/docs/reference/index/interfaces/Row_Row.md @@ -79,7 +79,7 @@ getAllCells: () => Cell[]; Defined in: [core/rows/coreRowsFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L58) -Returns all of the cells for the row. +Builds one cell for each leaf column, including cells for hidden columns. #### Returns @@ -95,7 +95,7 @@ getAllCellsByColumnId: () => Record>; Defined in: [core/rows/coreRowsFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L54) -Returns all of the cells for the row by column id. +Builds a lookup of this row's cells keyed by leaf column id. #### Returns @@ -159,7 +159,7 @@ getUniqueValues: (columnId) => TValue[]; Defined in: [core/rows/coreRowsFeature.types.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L74) -Returns a unique array of values from the row for a given columnId. +Reads the values this row contributes to faceting/grouping for a column. #### Type Parameters @@ -187,7 +187,7 @@ getValue: (columnId) => TValue; Defined in: [core/rows/coreRowsFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.types.ts#L78) -Returns the value from the row for a given columnId. +Reads this row's accessor value for a column id and caches the result. #### Type Parameters diff --git a/docs/reference/index/interfaces/Row_RowExpanding.md b/docs/reference/index/interfaces/Row_RowExpanding.md index 3f6cbb0431..bbba01f8d1 100644 --- a/docs/reference/index/interfaces/Row_RowExpanding.md +++ b/docs/reference/index/interfaces/Row_RowExpanding.md @@ -17,7 +17,7 @@ getCanExpand: () => boolean; Defined in: [features/row-expanding/rowExpandingFeature.types.ts:18](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L18) -Returns whether the row can be expanded. +Checks whether this row can be expanded. #### Returns @@ -33,7 +33,7 @@ getIsAllParentsExpanded: () => boolean; Defined in: [features/row-expanding/rowExpandingFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L22) -Returns whether all parent rows of the row are expanded. +Checks whether every ancestor of this row is expanded. #### Returns @@ -49,7 +49,7 @@ getIsExpanded: () => boolean; Defined in: [features/row-expanding/rowExpandingFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L26) -Returns whether the row is expanded. +Checks whether this row is currently expanded. #### Returns @@ -65,7 +65,7 @@ getToggleExpandedHandler: () => () => void; Defined in: [features/row-expanding/rowExpandingFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L30) -Returns a function that can be used to toggle the expanded state of the row. This function can be used to bind to an event handler to a button. +Creates a handler that toggles this row's expanded state. #### Returns diff --git a/docs/reference/index/interfaces/Row_RowPinning.md b/docs/reference/index/interfaces/Row_RowPinning.md index 08104a36ce..b50366a6a6 100644 --- a/docs/reference/index/interfaces/Row_RowPinning.md +++ b/docs/reference/index/interfaces/Row_RowPinning.md @@ -5,7 +5,7 @@ title: Row_RowPinning # Interface: Row\_RowPinning -Defined in: [features/row-pinning/rowPinningFeature.types.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L40) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L42) ## Properties @@ -15,9 +15,9 @@ Defined in: [features/row-pinning/rowPinningFeature.types.ts:40](https://github. getCanPin: () => boolean; ``` -Defined in: [features/row-pinning/rowPinningFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L44) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L46) -Returns whether or not the row can be pinned. +Checks whether this row can be pinned. #### Returns @@ -31,7 +31,7 @@ Returns whether or not the row can be pinned. getIsPinned: () => RowPinningPosition; ``` -Defined in: [features/row-pinning/rowPinningFeature.types.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L48) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L50) Returns the pinned position of the row. (`'top'`, `'bottom'` or `false`) @@ -47,7 +47,7 @@ Returns the pinned position of the row. (`'top'`, `'bottom'` or `false`) getPinnedIndex: () => number; ``` -Defined in: [features/row-pinning/rowPinningFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L52) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L54) Returns the numeric pinned index of the row within a pinned row group. @@ -63,7 +63,7 @@ Returns the numeric pinned index of the row within a pinned row group. pin: (position, includeLeafRows?, includeParentRows?) => void; ``` -Defined in: [features/row-pinning/rowPinningFeature.types.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L56) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L58) Pins a row to the `'top'` or `'bottom'`, or unpins the row to the center if `false` is passed. diff --git a/docs/reference/index/interfaces/Row_RowSelection.md b/docs/reference/index/interfaces/Row_RowSelection.md index 3bc9543911..eb7225febc 100644 --- a/docs/reference/index/interfaces/Row_RowSelection.md +++ b/docs/reference/index/interfaces/Row_RowSelection.md @@ -5,7 +5,7 @@ title: Row_RowSelection # Interface: Row\_RowSelection -Defined in: [features/row-selection/rowSelectionFeature.types.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L50) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L54) ## Properties @@ -15,9 +15,9 @@ Defined in: [features/row-selection/rowSelectionFeature.types.ts:50](https://git getCanMultiSelect: () => boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L54) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L58) -Returns whether or not the row can multi-select. +Checks whether this row can be selected alongside other rows. #### Returns @@ -31,9 +31,9 @@ Returns whether or not the row can multi-select. getCanSelect: () => boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L58) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L62) -Returns whether or not the row can be selected. +Checks whether this row can currently be selected. #### Returns @@ -47,9 +47,9 @@ Returns whether or not the row can be selected. getCanSelectSubRows: () => boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L62) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L66) -Returns whether or not the row can select sub rows automatically when the parent row is selected. +Checks whether selecting this row should also select its subRows. #### Returns @@ -63,9 +63,9 @@ Returns whether or not the row can select sub rows automatically when the parent getIsAllSubRowsSelected: () => boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L66) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:70](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L70) -Returns whether or not all of the row's sub rows are selected. +Checks whether all selectable descendants are selected. #### Returns @@ -79,9 +79,9 @@ Returns whether or not all of the row's sub rows are selected. getIsSelected: () => boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:70](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L70) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L74) -Returns whether or not the row is selected. +Checks whether this row id is selected. #### Returns @@ -95,9 +95,9 @@ Returns whether or not the row is selected. getIsSomeSelected: () => boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L74) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L78) -Returns whether or not some of the row's sub rows are selected. +Checks whether some selectable descendants are selected. #### Returns @@ -111,9 +111,9 @@ Returns whether or not some of the row's sub rows are selected. getToggleSelectedHandler: () => (event) => void; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L78) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L82) -Returns a handler that can be used to toggle the row. +Creates a checkbox-style handler that toggles this row's selected state. #### Returns @@ -139,7 +139,7 @@ Returns a handler that can be used to toggle the row. toggleSelected: (value?, opts?) => void; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L82) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L86) Selects/deselects the row. diff --git a/docs/reference/index/interfaces/StringHeaderIdentifier.md b/docs/reference/index/interfaces/StringHeaderIdentifier.md index 6b5b0a6d8a..6e7e0a6608 100644 --- a/docs/reference/index/interfaces/StringHeaderIdentifier.md +++ b/docs/reference/index/interfaces/StringHeaderIdentifier.md @@ -5,7 +5,7 @@ title: StringHeaderIdentifier # Interface: StringHeaderIdentifier -Defined in: [types/ColumnDef.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L45) +Defined in: [types/ColumnDef.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L57) ## Properties @@ -15,7 +15,9 @@ Defined in: [types/ColumnDef.ts:45](https://github.com/TanStack/table/blob/main/ header: string; ``` -Defined in: [types/ColumnDef.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L46) +Defined in: [types/ColumnDef.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L61) + +Header text used both for rendering and as a fallback column id. *** @@ -25,4 +27,6 @@ Defined in: [types/ColumnDef.ts:46](https://github.com/TanStack/table/blob/main/ optional id: string; ``` -Defined in: [types/ColumnDef.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L47) +Defined in: [types/ColumnDef.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L65) + +Optional explicit id that overrides the header-derived id. diff --git a/docs/reference/index/interfaces/TableOptions_ColumnFiltering.md b/docs/reference/index/interfaces/TableOptions_ColumnFiltering.md index 880589a701..13544edeed 100644 --- a/docs/reference/index/interfaces/TableOptions_ColumnFiltering.md +++ b/docs/reference/index/interfaces/TableOptions_ColumnFiltering.md @@ -5,7 +5,7 @@ title: TableOptions_ColumnFiltering # Interface: TableOptions\_ColumnFiltering\ -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:143](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L143) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:149](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L149) ## Type Parameters @@ -25,9 +25,9 @@ Defined in: [features/column-filtering/columnFilteringFeature.types.ts:143](http optional enableColumnFilters: boolean; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:150](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L150) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L156) -Enables/disables **column** filtering for all columns. +Enables column-specific filtering for all columns that also allow it. *** @@ -37,9 +37,11 @@ Enables/disables **column** filtering for all columns. optional enableFilters: boolean; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:154](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L154) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:162](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L162) + +Enables all filtering features for the table. -Enables/disables all filtering for the table. +Set this to `false` to disable both column filtering and global filtering. *** @@ -49,7 +51,7 @@ Enables/disables all filtering for the table. optional filterFromLeafRows: boolean; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:158](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L158) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:166](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L166) By default, filtering is done from parent rows down (so if a parent row is filtered out, all of its children will be filtered out as well). Setting this option to `true` will cause filtering to be done from leaf rows up (which means parent rows will be included so long as one of their child or grand-child rows is also included). @@ -61,7 +63,7 @@ By default, filtering is done from parent rows down (so if a parent row is filte optional manualFiltering: boolean; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:162](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L162) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:170](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L170) Disables the `getFilteredRowModel` from being used to filter data. This may be useful if your table needs to dynamically support both client-side and server-side filtering. @@ -73,7 +75,7 @@ Disables the `getFilteredRowModel` from being used to filter data. This may be u optional maxLeafRowFilterDepth: number; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:168](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L168) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:176](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L176) By default, filtering is done for all rows (max depth of 100), no matter if they are root level parent rows or the child leaf rows of a parent row. Setting this option to `0` will cause filtering to only be applied to the root level parent rows, with all sub-rows remaining unfiltered. Similarly, setting this option to `1` will cause filtering to only be applied to child leaf rows 1 level deep, and so on. @@ -87,7 +89,7 @@ This is useful for situations where you want a row's entire child hierarchy to b optional onColumnFiltersChange: OnChangeFn; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:174](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L174) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:182](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L182) Called with an updater when column filter state changes. Pair this with `state.columnFilters` when using external state; external atoms can own the diff --git a/docs/reference/index/interfaces/TableOptions_ColumnGrouping.md b/docs/reference/index/interfaces/TableOptions_ColumnGrouping.md index f9d376d414..71a545ad13 100644 --- a/docs/reference/index/interfaces/TableOptions_ColumnGrouping.md +++ b/docs/reference/index/interfaces/TableOptions_ColumnGrouping.md @@ -5,7 +5,7 @@ title: TableOptions_ColumnGrouping # Interface: TableOptions\_ColumnGrouping -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:152](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L152) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:154](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L154) ## Properties @@ -15,9 +15,9 @@ Defined in: [features/column-grouping/columnGroupingFeature.types.ts:152](https: optional enableGrouping: boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L156) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:158](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L158) -Enables/disables grouping for the table. +Allows columns to be grouped for this table. *** @@ -27,7 +27,7 @@ Enables/disables grouping for the table. optional groupedColumnMode: false | "reorder" | "remove"; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:160](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L160) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:162](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L162) Grouping columns are automatically reordered by default to the start of the columns list. If you would rather remove them or leave them as-is, set the appropriate mode here. @@ -39,7 +39,7 @@ Grouping columns are automatically reordered by default to the start of the colu optional manualGrouping: boolean; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:164](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L164) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:166](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L166) Enables manual grouping. If this option is set to `true`, the table will not automatically group rows using `getGroupedRowModel()` and instead will expect you to manually group the rows before passing them to the table. This is useful if you are doing server-side grouping and aggregation. @@ -51,7 +51,7 @@ Enables manual grouping. If this option is set to `true`, the table will not aut optional onGroupingChange: OnChangeFn; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:170](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L170) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:172](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L172) Called with an updater when grouping state changes. Pair this with `state.grouping` when using external state; external atoms can own the diff --git a/docs/reference/index/interfaces/TableOptions_ColumnPinning.md b/docs/reference/index/interfaces/TableOptions_ColumnPinning.md index 52ddfb2d04..b7bfb2213b 100644 --- a/docs/reference/index/interfaces/TableOptions_ColumnPinning.md +++ b/docs/reference/index/interfaces/TableOptions_ColumnPinning.md @@ -15,9 +15,12 @@ Defined in: [features/column-pinning/columnPinningFeature.types.ts:19](https://g optional enableColumnPinning: boolean; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L23) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L26) -Enables/disables column pinning for the table. Defaults to `true`. +Allows columns to be pinned into left and right regions. + +Defaults to `true`; column-level `enablePinning` can still opt individual +columns out. *** @@ -27,7 +30,7 @@ Enables/disables column pinning for the table. Defaults to `true`. optional onColumnPinningChange: OnChangeFn; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L29) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L32) Called with an updater when column pinning state changes. Pair this with `state.columnPinning` when using external state; external atoms can own the diff --git a/docs/reference/index/interfaces/TableOptions_Columns.md b/docs/reference/index/interfaces/TableOptions_Columns.md index 45ae5215df..5443689955 100644 --- a/docs/reference/index/interfaces/TableOptions_Columns.md +++ b/docs/reference/index/interfaces/TableOptions_Columns.md @@ -5,7 +5,7 @@ title: TableOptions_Columns # Interface: TableOptions\_Columns\ -Defined in: [core/columns/coreColumnsFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L60) +Defined in: [core/columns/coreColumnsFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L61) ## Extended by @@ -33,7 +33,7 @@ Defined in: [core/columns/coreColumnsFeature.types.ts:60](https://github.com/Tan columns: readonly ColumnDef[]; ``` -Defined in: [core/columns/coreColumnsFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L68) +Defined in: [core/columns/coreColumnsFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L69) The array of column defs to use for the table. @@ -45,6 +45,6 @@ The array of column defs to use for the table. optional defaultColumn: Partial>; ``` -Defined in: [core/columns/coreColumnsFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L72) +Defined in: [core/columns/coreColumnsFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L73) Default column options to use for all column defs supplied to the table. diff --git a/docs/reference/index/interfaces/TableOptions_Core.md b/docs/reference/index/interfaces/TableOptions_Core.md index 5e7b25d6bc..8aff92be1e 100644 --- a/docs/reference/index/interfaces/TableOptions_Core.md +++ b/docs/reference/index/interfaces/TableOptions_Core.md @@ -5,7 +5,10 @@ title: TableOptions_Core # Interface: TableOptions\_Core\ -Defined in: [types/TableOptions.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L27) +Defined in: [types/TableOptions.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L31) + +Core options that are always available on a table, before optional feature +options are mixed in. ## Extends @@ -29,9 +32,12 @@ Defined in: [types/TableOptions.ts:27](https://github.com/TanStack/table/blob/ma readonly _features: TFeatures; ``` -Defined in: [core/table/coreTablesFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L71) +Defined in: [core/table/coreTablesFeature.types.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L74) + +The feature modules registered on this table instance. -The features that you want to enable for the table. +Feature registration controls which state slices, options, and prototype +APIs are available. #### Inherited from @@ -45,9 +51,10 @@ The features that you want to enable for the table. readonly optional _rowModels: CreateRowModels_All; ``` -Defined in: [core/table/coreTablesFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L75) +Defined in: [core/table/coreTablesFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L79) -The row model options that you want to enable for the table. +Row model factories used by features such as filtering, grouping, sorting, +expansion, and pagination. #### Inherited from @@ -61,7 +68,7 @@ The row model options that you want to enable for the table. readonly optional atoms: Partial<{ [K in string | number | symbol]: Atom[K]> }>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L83) +Defined in: [core/table/coreTablesFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L87) Optionally, provide your own external writable atoms for individual state slices. When an atom is provided for a given slice, it takes precedence over `options.state[key]` @@ -81,7 +88,7 @@ model for app-managed table state slices. readonly optional autoResetAll: boolean; ``` -Defined in: [core/table/coreTablesFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L87) +Defined in: [core/table/coreTablesFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L91) Set this option to override any of the `autoReset...` feature options. @@ -97,7 +104,7 @@ Set this option to override any of the `autoReset...` feature options. columns: readonly ColumnDef[]; ``` -Defined in: [core/columns/coreColumnsFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L68) +Defined in: [core/columns/coreColumnsFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L69) The array of column defs to use for the table. @@ -113,7 +120,7 @@ The array of column defs to use for the table. readonly data: readonly TData[]; ``` -Defined in: [core/table/coreTablesFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L91) +Defined in: [core/table/coreTablesFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L95) The data for the table to display. When the `data` option changes reference, the table will reprocess the data. @@ -129,7 +136,7 @@ The data for the table to display. When the `data` option changes reference, the optional defaultColumn: Partial>; ``` -Defined in: [core/columns/coreColumnsFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L72) +Defined in: [core/columns/coreColumnsFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L73) Default column options to use for all column defs supplied to the table. @@ -221,7 +228,7 @@ getSubRows: row => row.subRows readonly optional initialState: Partial>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L98) +Defined in: [core/table/coreTablesFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L102) Optionally provide starting values for registered table state slices. Feature reset APIs use this value by default, and many reset APIs accept @@ -240,7 +247,7 @@ object later does not reset table state, so it does not need to be stable. readonly optional mergeOptions: (defaultOptions, options) => TableOptions; ``` -Defined in: [core/table/coreTablesFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L102) +Defined in: [core/table/coreTablesFeature.types.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L106) This option is used to optionally implement the merging of table options. @@ -270,7 +277,7 @@ This option is used to optionally implement the merging of table options. readonly optional meta: TableMeta; ``` -Defined in: [core/table/coreTablesFeature.types.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L109) +Defined in: [core/table/coreTablesFeature.types.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L113) You can pass any object to `options.meta` and access it anywhere the `table` is available via `table.options.meta`. @@ -302,7 +309,7 @@ Value used when the desired value is not found in the data. readonly optional state: Partial>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L117) +Defined in: [core/table/coreTablesFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L121) Optionally provide externally managed values for individual state slices. diff --git a/docs/reference/index/interfaces/TableOptions_GlobalFiltering.md b/docs/reference/index/interfaces/TableOptions_GlobalFiltering.md index 48941b498e..abfa860031 100644 --- a/docs/reference/index/interfaces/TableOptions_GlobalFiltering.md +++ b/docs/reference/index/interfaces/TableOptions_GlobalFiltering.md @@ -5,7 +5,7 @@ title: TableOptions_GlobalFiltering # Interface: TableOptions\_GlobalFiltering\ -Defined in: [features/global-filtering/globalFilteringFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L32) +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L35) ## Type Parameters @@ -25,9 +25,9 @@ Defined in: [features/global-filtering/globalFilteringFeature.types.ts:32](https optional enableGlobalFilter: boolean; ``` -Defined in: [features/global-filtering/globalFilteringFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L39) +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L42) -Enables/disables **global** filtering for all columns. +Enables global filtering across columns that allow it. *** @@ -37,7 +37,7 @@ Enables/disables **global** filtering for all columns. optional getColumnCanGlobalFilter: (column) => boolean; ``` -Defined in: [features/global-filtering/globalFilteringFeature.types.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L44) +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L47) If provided, this function will be called with the column and should return `true` or `false` to indicate whether this column should be used for global filtering. This is useful if the column can contain data that is not `string` or `number` (i.e. `undefined`). @@ -74,7 +74,7 @@ This is useful if the column can contain data that is not `string` or `number` ( optional globalFilterFn: FilterFnOption; ``` -Defined in: [features/global-filtering/globalFilteringFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L57) +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L60) The filter function to use for global filtering. - A `string` referencing a built-in filter function @@ -89,7 +89,7 @@ The filter function to use for global filtering. optional onGlobalFilterChange: OnChangeFn; ``` -Defined in: [features/global-filtering/globalFilteringFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L63) +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L66) Called with an updater when global filter state changes. Pair this with `state.globalFilter` when using external state; external atoms can own the diff --git a/docs/reference/index/interfaces/TableOptions_RowExpanding.md b/docs/reference/index/interfaces/TableOptions_RowExpanding.md index 94b41cd6d3..b5164a49f3 100644 --- a/docs/reference/index/interfaces/TableOptions_RowExpanding.md +++ b/docs/reference/index/interfaces/TableOptions_RowExpanding.md @@ -39,7 +39,7 @@ optional enableExpanding: boolean; Defined in: [features/row-expanding/rowExpandingFeature.types.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L48) -Enable/disable expanding for all rows. +Allows rows with subRows to be expanded. *** diff --git a/docs/reference/index/interfaces/TableOptions_RowPinning.md b/docs/reference/index/interfaces/TableOptions_RowPinning.md index b45fa7caa7..cb38545472 100644 --- a/docs/reference/index/interfaces/TableOptions_RowPinning.md +++ b/docs/reference/index/interfaces/TableOptions_RowPinning.md @@ -25,9 +25,11 @@ Defined in: [features/row-pinning/rowPinningFeature.types.ts:16](https://github. optional enableRowPinning: boolean | (row) => boolean; ``` -Defined in: [features/row-pinning/rowPinningFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L23) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L25) -Enables/disables row pinning for the table. Defaults to `true`. +Allows rows to be pinned to top or bottom regions. + +Provide a predicate to decide per row. Defaults to `true`. *** @@ -37,7 +39,7 @@ Enables/disables row pinning for the table. Defaults to `true`. optional keepPinnedRows: boolean; ``` -Defined in: [features/row-pinning/rowPinningFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L27) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L29) When `false`, pinned rows will not be visible if they are filtered or paginated out of the table. When `true`, pinned rows will always be visible regardless of filtering or pagination. Defaults to `true`. @@ -49,7 +51,7 @@ When `false`, pinned rows will not be visible if they are filtered or paginated optional onRowPinningChange: OnChangeFn; ``` -Defined in: [features/row-pinning/rowPinningFeature.types.ts:33](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L33) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L35) Called with an updater when row pinning state changes. Pair this with `state.rowPinning` when using external state; external atoms can own the diff --git a/docs/reference/index/interfaces/TableOptions_RowSelection.md b/docs/reference/index/interfaces/TableOptions_RowSelection.md index 2ee9a181f4..d9da7211c6 100644 --- a/docs/reference/index/interfaces/TableOptions_RowSelection.md +++ b/docs/reference/index/interfaces/TableOptions_RowSelection.md @@ -25,10 +25,11 @@ Defined in: [features/row-selection/rowSelectionFeature.types.ts:12](https://git optional enableMultiRowSelection: boolean | (row) => boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L20) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L21) -- Enables/disables multiple row selection for all rows in the table OR -- A function that given a row, returns whether to enable/disable multiple row selection for that row's children/grandchildren +Allows rows to be selected alongside other rows. + +Provide a predicate to decide per row. Defaults to `true`. *** @@ -38,10 +39,11 @@ Defined in: [features/row-selection/rowSelectionFeature.types.ts:20](https://git optional enableRowSelection: boolean | (row) => boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L25) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L27) + +Allows rows to be selected. -- Enables/disables row selection for all rows in the table OR -- A function that given a row, returns whether to enable/disable row selection for that row +Provide a predicate to decide per row. Defaults to `true`. *** @@ -51,10 +53,12 @@ Defined in: [features/row-selection/rowSelectionFeature.types.ts:25](https://git optional enableSubRowSelection: boolean | (row) => boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L30) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L34) + +Controls whether selecting a parent row also selects its subRows. -Enables/disables automatic sub-row selection when a parent row is selected, or a function that enables/disables automatic sub-row selection for each row. -(Use in combination with expanding or grouping features) +Provide a predicate to decide per row. This is most useful with expanding or +grouping features and defaults to `true`. *** @@ -64,7 +68,7 @@ Enables/disables automatic sub-row selection when a parent row is selected, or a optional onRowSelectionChange: OnChangeFn; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L36) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L40) Called with an updater when row selection state changes. Pair this with `state.rowSelection` when using external state; external atoms can own the diff --git a/docs/reference/index/interfaces/TableOptions_RowSorting.md b/docs/reference/index/interfaces/TableOptions_RowSorting.md index 84900e14c9..4025d99279 100644 --- a/docs/reference/index/interfaces/TableOptions_RowSorting.md +++ b/docs/reference/index/interfaces/TableOptions_RowSorting.md @@ -17,7 +17,7 @@ optional enableMultiRemove: boolean; Defined in: [features/row-sorting/rowSortingFeature.types.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L147) -Enables/disables the ability to remove multi-sorts +Allows multi-sort toggles to remove a column from sorting state. *** diff --git a/docs/reference/index/interfaces/TableOptions_Table.md b/docs/reference/index/interfaces/TableOptions_Table.md index 5fb714722c..da50fa6a91 100644 --- a/docs/reference/index/interfaces/TableOptions_Table.md +++ b/docs/reference/index/interfaces/TableOptions_Table.md @@ -29,9 +29,12 @@ Defined in: [core/table/coreTablesFeature.types.ts:64](https://github.com/TanSta readonly _features: TFeatures; ``` -Defined in: [core/table/coreTablesFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L71) +Defined in: [core/table/coreTablesFeature.types.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L74) -The features that you want to enable for the table. +The feature modules registered on this table instance. + +Feature registration controls which state slices, options, and prototype +APIs are available. *** @@ -41,9 +44,10 @@ The features that you want to enable for the table. readonly optional _rowModels: CreateRowModels_All; ``` -Defined in: [core/table/coreTablesFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L75) +Defined in: [core/table/coreTablesFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L79) -The row model options that you want to enable for the table. +Row model factories used by features such as filtering, grouping, sorting, +expansion, and pagination. *** @@ -53,7 +57,7 @@ The row model options that you want to enable for the table. readonly optional atoms: Partial<{ [K in string | number | symbol]: Atom[K]> }>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L83) +Defined in: [core/table/coreTablesFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L87) Optionally, provide your own external writable atoms for individual state slices. When an atom is provided for a given slice, it takes precedence over `options.state[key]` @@ -69,7 +73,7 @@ model for app-managed table state slices. readonly optional autoResetAll: boolean; ``` -Defined in: [core/table/coreTablesFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L87) +Defined in: [core/table/coreTablesFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L91) Set this option to override any of the `autoReset...` feature options. @@ -81,7 +85,7 @@ Set this option to override any of the `autoReset...` feature options. readonly data: readonly TData[]; ``` -Defined in: [core/table/coreTablesFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L91) +Defined in: [core/table/coreTablesFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L95) The data for the table to display. When the `data` option changes reference, the table will reprocess the data. @@ -93,7 +97,7 @@ The data for the table to display. When the `data` option changes reference, the readonly optional initialState: Partial>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L98) +Defined in: [core/table/coreTablesFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L102) Optionally provide starting values for registered table state slices. Feature reset APIs use this value by default, and many reset APIs accept @@ -108,7 +112,7 @@ object later does not reset table state, so it does not need to be stable. readonly optional mergeOptions: (defaultOptions, options) => TableOptions; ``` -Defined in: [core/table/coreTablesFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L102) +Defined in: [core/table/coreTablesFeature.types.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L106) This option is used to optionally implement the merging of table options. @@ -134,7 +138,7 @@ This option is used to optionally implement the merging of table options. readonly optional meta: TableMeta; ``` -Defined in: [core/table/coreTablesFeature.types.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L109) +Defined in: [core/table/coreTablesFeature.types.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L113) You can pass any object to `options.meta` and access it anywhere the `table` is available via `table.options.meta`. @@ -146,7 +150,7 @@ You can pass any object to `options.meta` and access it anywhere the `table` is readonly optional state: Partial>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L117) +Defined in: [core/table/coreTablesFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L121) Optionally provide externally managed values for individual state slices. diff --git a/docs/reference/index/interfaces/Table_ColumnFaceting.md b/docs/reference/index/interfaces/Table_ColumnFaceting.md index d89195338d..829f922341 100644 --- a/docs/reference/index/interfaces/Table_ColumnFaceting.md +++ b/docs/reference/index/interfaces/Table_ColumnFaceting.md @@ -5,7 +5,7 @@ title: Table_ColumnFaceting # Interface: Table\_ColumnFaceting\ -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L87) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L93) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/column-faceting/columnFacetingFeature.types.ts:87](https:/ getGlobalFacetedMinMaxValues: () => [number, number] | undefined; ``` -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L94) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L100) Returns the min and max values for the global filter. @@ -41,9 +41,9 @@ Returns the min and max values for the global filter. getGlobalFacetedRowModel: () => RowModel; ``` -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L98) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L104) -Returns the row model for the table after **global** filtering has been applied. +Computes the row model used to derive global facet values. #### Returns @@ -57,7 +57,7 @@ Returns the row model for the table after **global** filtering has been applied. getGlobalFacetedUniqueValues: () => Map; ``` -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L102) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L108) Returns the faceted unique values for the global filter. diff --git a/docs/reference/index/interfaces/Table_ColumnFiltering.md b/docs/reference/index/interfaces/Table_ColumnFiltering.md index fc9a2bd057..5edcd58ece 100644 --- a/docs/reference/index/interfaces/Table_ColumnFiltering.md +++ b/docs/reference/index/interfaces/Table_ColumnFiltering.md @@ -5,7 +5,7 @@ title: Table_ColumnFiltering # Interface: Table\_ColumnFiltering -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:177](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L177) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:185](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L185) ## Properties @@ -15,9 +15,11 @@ Defined in: [features/column-filtering/columnFilteringFeature.types.ts:177](http resetColumnFilters: (defaultState?) => void; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:181](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L181) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:191](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L191) + +Resets `columnFilters` to `initialState.columnFilters`. -Resets the **columnFilters** state to `initialState.columnFilters`, or `true` can be passed to force a default blank state reset to `[]`. +Pass `true` to ignore initial state and reset to `[]`. #### Parameters @@ -37,9 +39,9 @@ Resets the **columnFilters** state to `initialState.columnFilters`, or `true` ca setColumnFilters: (updater) => void; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:185](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L185) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:195](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L195) -Sets column filter state using a value or updater. +Updates column filter state with a next array or updater function. #### Parameters diff --git a/docs/reference/index/interfaces/Table_ColumnGrouping.md b/docs/reference/index/interfaces/Table_ColumnGrouping.md index cf768c7f93..1a0508b510 100644 --- a/docs/reference/index/interfaces/Table_ColumnGrouping.md +++ b/docs/reference/index/interfaces/Table_ColumnGrouping.md @@ -5,7 +5,7 @@ title: Table_ColumnGrouping # Interface: Table\_ColumnGrouping\ -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:175](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L175) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:177](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L177) ## Type Parameters @@ -25,9 +25,11 @@ Defined in: [features/column-grouping/columnGroupingFeature.types.ts:175](https: resetGrouping: (defaultState?) => void; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:182](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L182) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:186](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L186) + +Resets `grouping` to `initialState.grouping`. -Resets the **grouping** state to `initialState.grouping`, or `true` can be passed to force a default blank state reset to `[]`. +Pass `true` to ignore initial state and reset to `[]`. #### Parameters @@ -47,9 +49,9 @@ Resets the **grouping** state to `initialState.grouping`, or `true` can be passe setGrouping: (updater) => void; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:186](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L186) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:190](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L190) -Sets grouping state using a value or updater. +Updates grouping state with a next ordered id array or updater function. #### Parameters diff --git a/docs/reference/index/interfaces/Table_ColumnOrdering.md b/docs/reference/index/interfaces/Table_ColumnOrdering.md index 6df7341786..52cf8ebfe5 100644 --- a/docs/reference/index/interfaces/Table_ColumnOrdering.md +++ b/docs/reference/index/interfaces/Table_ColumnOrdering.md @@ -5,7 +5,7 @@ title: Table_ColumnOrdering # Interface: Table\_ColumnOrdering\ -Defined in: [features/column-ordering/columnOrderingFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L39) +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L46) ## Type Parameters @@ -25,9 +25,11 @@ Defined in: [features/column-ordering/columnOrderingFeature.types.ts:39](https:/ resetColumnOrder: (defaultState?) => void; ``` -Defined in: [features/column-ordering/columnOrderingFeature.types.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L46) +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L55) + +Resets `columnOrder` to `initialState.columnOrder`. -Resets the **columnOrder** state to `initialState.columnOrder`, or `true` can be passed to force a default blank state reset to `[]`. +Pass `true` to ignore initial state and reset to `[]`. #### Parameters @@ -47,9 +49,9 @@ Resets the **columnOrder** state to `initialState.columnOrder`, or `true` can be setColumnOrder: (updater) => void; ``` -Defined in: [features/column-ordering/columnOrderingFeature.types.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L50) +Defined in: [features/column-ordering/columnOrderingFeature.types.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts#L59) -Sets column order state using a value or updater. +Updates column order state with a next ordered id array or updater function. #### Parameters diff --git a/docs/reference/index/interfaces/Table_ColumnPinning.md b/docs/reference/index/interfaces/Table_ColumnPinning.md index 941ccfdec8..5c1980e06a 100644 --- a/docs/reference/index/interfaces/Table_ColumnPinning.md +++ b/docs/reference/index/interfaces/Table_ColumnPinning.md @@ -5,7 +5,7 @@ title: Table_ColumnPinning # Interface: Table\_ColumnPinning\ -Defined in: [features/column-pinning/columnPinningFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L80) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L87) ## Type Parameters @@ -25,9 +25,10 @@ Defined in: [features/column-pinning/columnPinningFeature.types.ts:80](https://g getCenterFlatHeaders: () => Header[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L87) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L95) -If pinning, returns headers for all columns that are not pinned, including parent headers. +Builds flat center-region headers for columns that are not pinned, +including parent headers. #### Returns @@ -41,9 +42,9 @@ If pinning, returns headers for all columns that are not pinned, including paren getCenterFooterGroups: () => HeaderGroup[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L91) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L99) -If pinning, returns the footer groups for columns that are not pinned. +Builds footer groups for the center region of unpinned columns. #### Returns @@ -57,9 +58,9 @@ If pinning, returns the footer groups for columns that are not pinned. getCenterHeaderGroups: () => HeaderGroup[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L95) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:103](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L103) -If pinning, returns the header groups for columns that are not pinned. +Builds header groups for the center region of unpinned columns. #### Returns @@ -73,9 +74,9 @@ If pinning, returns the header groups for columns that are not pinned. getCenterLeafColumns: () => Column[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L99) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:107](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L107) -Returns all center pinned (unpinned) leaf columns. +Gets leaf columns that are not pinned left or right. #### Returns @@ -89,9 +90,9 @@ Returns all center pinned (unpinned) leaf columns. getCenterLeafHeaders: () => Header[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:103](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L103) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:111](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L111) -If pinning, returns headers for all columns that are not pinned, (not including parent headers). +Builds center-region leaf headers for columns that are not pinned. #### Returns @@ -105,9 +106,9 @@ If pinning, returns headers for all columns that are not pinned, (not including getCenterVisibleLeafColumns: () => Column[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:107](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L107) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L115) -If column pinning, returns a flat array of leaf-node columns that are visible in the unpinned/center portion of the table. +Lists visible leaf columns in the unpinned center region. #### Returns @@ -121,9 +122,9 @@ If column pinning, returns a flat array of leaf-node columns that are visible in getIsSomeColumnsPinned: (position?) => boolean; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:111](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L111) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L119) -Returns whether or not any columns are pinned. Optionally specify to only check for pinned columns in either the `left` or `right` position. +Checks whether any columns are pinned, optionally limited to one side. #### Parameters @@ -143,9 +144,10 @@ Returns whether or not any columns are pinned. Optionally specify to only check getLeftFlatHeaders: () => Header[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L115) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:124](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L124) -If pinning, returns headers for all left pinned columns in the table, including parent headers. +Builds flat left-region headers for pinned columns, including parent +headers. #### Returns @@ -159,9 +161,9 @@ If pinning, returns headers for all left pinned columns in the table, including getLeftFooterGroups: () => HeaderGroup[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L119) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:128](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L128) -If pinning, returns the footer groups for the left pinned columns. +Builds footer groups for left-pinned columns. #### Returns @@ -175,9 +177,9 @@ If pinning, returns the footer groups for the left pinned columns. getLeftHeaderGroups: () => HeaderGroup[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:123](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L123) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:132](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L132) -If pinning, returns the header groups for the left pinned columns. +Builds header groups for left-pinned columns. #### Returns @@ -191,9 +193,9 @@ If pinning, returns the header groups for the left pinned columns. getLeftLeafColumns: () => Column[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:127](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L127) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L136) -Returns all left pinned leaf columns. +Gets leaf columns pinned to the left region in pinning-state order. #### Returns @@ -207,9 +209,9 @@ Returns all left pinned leaf columns. getLeftLeafHeaders: () => Header[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:131](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L131) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L140) -If pinning, returns headers for all left pinned leaf columns in the table, (not including parent headers). +Builds leaf headers for left-pinned columns. #### Returns @@ -223,9 +225,9 @@ If pinning, returns headers for all left pinned leaf columns in the table, (not getLeftVisibleLeafColumns: () => Column[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:135](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L135) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L144) -If column pinning, returns a flat array of leaf-node columns that are visible in the left portion of the table. +Lists visible leaf columns in the left pinned region. #### Returns @@ -239,7 +241,7 @@ If column pinning, returns a flat array of leaf-node columns that are visible in getPinnedLeafColumns: (position) => Column[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:171](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L171) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:183](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L183) Returns pinned leaf columns for the requested pinning region. @@ -261,9 +263,9 @@ Returns pinned leaf columns for the requested pinning region. getPinnedVisibleLeafColumns: (position) => Column[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:177](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L177) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:189](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L189) -Returns visible pinned leaf columns for the requested pinning region. +Lists visible leaf columns for the requested pinning region. #### Parameters @@ -283,9 +285,10 @@ Returns visible pinned leaf columns for the requested pinning region. getRightFlatHeaders: () => Header[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:139](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L139) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:149](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L149) -If pinning, returns headers for all right pinned columns in the table, including parent headers. +Builds flat right-region headers for pinned columns, including parent +headers. #### Returns @@ -299,9 +302,9 @@ If pinning, returns headers for all right pinned columns in the table, including getRightFooterGroups: () => HeaderGroup[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:143](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L143) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:153](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L153) -If pinning, returns the footer groups for the right pinned columns. +Builds footer groups for right-pinned columns. #### Returns @@ -315,9 +318,9 @@ If pinning, returns the footer groups for the right pinned columns. getRightHeaderGroups: () => HeaderGroup[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L147) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:157](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L157) -If pinning, returns the header groups for the right pinned columns. +Builds header groups for right-pinned columns. #### Returns @@ -331,9 +334,9 @@ If pinning, returns the header groups for the right pinned columns. getRightLeafColumns: () => Column[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:151](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L151) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:161](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L161) -Returns all right pinned leaf columns. +Gets leaf columns pinned to the right region in pinning-state order. #### Returns @@ -347,9 +350,9 @@ Returns all right pinned leaf columns. getRightLeafHeaders: () => Header[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:155](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L155) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:165](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L165) -If pinning, returns headers for all right pinned leaf columns in the table, (not including parent headers). +Builds leaf headers for right-pinned columns. #### Returns @@ -363,9 +366,9 @@ If pinning, returns headers for all right pinned leaf columns in the table, (not getRightVisibleLeafColumns: () => Column[]; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:159](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L159) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:169](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L169) -If column pinning, returns a flat array of leaf-node columns that are visible in the right portion of the table. +Lists visible leaf columns in the right pinned region. #### Returns @@ -379,9 +382,11 @@ If column pinning, returns a flat array of leaf-node columns that are visible in resetColumnPinning: (defaultState?) => void; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L163) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:175](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L175) + +Resets `columnPinning` to `initialState.columnPinning`. -Resets the **columnPinning** state to `initialState.columnPinning`, or `true` can be passed to force a default blank state reset to `{ left: [], right: [], }`. +Pass `true` to ignore initial state and reset to empty left/right arrays. #### Parameters @@ -401,9 +406,9 @@ Resets the **columnPinning** state to `initialState.columnPinning`, or `true` ca setColumnPinning: (updater) => void; ``` -Defined in: [features/column-pinning/columnPinningFeature.types.ts:167](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L167) +Defined in: [features/column-pinning/columnPinningFeature.types.ts:179](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts#L179) -Sets column pinning state using a value or updater. +Updates column pinning state with a next state or updater function. #### Parameters diff --git a/docs/reference/index/interfaces/Table_ColumnResizing.md b/docs/reference/index/interfaces/Table_ColumnResizing.md index f509e4f082..d4bbacaf3e 100644 --- a/docs/reference/index/interfaces/Table_ColumnResizing.md +++ b/docs/reference/index/interfaces/Table_ColumnResizing.md @@ -15,10 +15,11 @@ Defined in: [features/column-resizing/columnResizingFeature.types.ts:48](https:/ resetHeaderSizeInfo: (defaultState?) => void; ``` -Defined in: [features/column-resizing/columnResizingFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L53) +Defined in: [features/column-resizing/columnResizingFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L54) -Resets transient resize interaction state to `initialState.columnResizing`. -Pass `true` to reset to the feature's default blank resize state instead. +Resets `columnResizing` to `initialState.columnResizing`. + +Pass `true` to ignore initial state and reset to the no-drag default state. #### Parameters @@ -38,9 +39,9 @@ Pass `true` to reset to the feature's default blank resize state instead. setcolumnResizing: (updater) => void; ``` -Defined in: [features/column-resizing/columnResizingFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L60) +Defined in: [features/column-resizing/columnResizingFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts#L61) -Sets the transient resize interaction state using a value or updater. +Updates transient resize interaction state with a next state or updater function. The lowercase `c` in this API name matches the current generated v9 table API for the `columnResizing` state slice. diff --git a/docs/reference/index/interfaces/Table_ColumnSizing.md b/docs/reference/index/interfaces/Table_ColumnSizing.md index 825397af82..c206665f06 100644 --- a/docs/reference/index/interfaces/Table_ColumnSizing.md +++ b/docs/reference/index/interfaces/Table_ColumnSizing.md @@ -17,7 +17,7 @@ getCenterTotalSize: () => number; Defined in: [features/column-sizing/columnSizingFeature.types.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L28) -If pinning, returns the total size of the center portion of the table by calculating the sum of the sizes of all unpinned/center leaf-columns. +Sums the current sizes of visible center-region leaf columns. #### Returns @@ -33,7 +33,7 @@ getLeftTotalSize: () => number; Defined in: [features/column-sizing/columnSizingFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L32) -Returns the total size of the left portion of the table by calculating the sum of the sizes of all left leaf-columns. +Sums the current sizes of visible left-pinned leaf columns. #### Returns @@ -49,7 +49,7 @@ getRightTotalSize: () => number; Defined in: [features/column-sizing/columnSizingFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L36) -Returns the total size of the right portion of the table by calculating the sum of the sizes of all right leaf-columns. +Sums the current sizes of visible right-pinned leaf columns. #### Returns @@ -65,7 +65,7 @@ getTotalSize: () => number; Defined in: [features/column-sizing/columnSizingFeature.types.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L40) -Returns the total size of the table by calculating the sum of the sizes of all leaf-columns. +Sums the current sizes of all visible leaf columns. #### Returns @@ -104,7 +104,7 @@ setColumnSizing: (updater) => void; Defined in: [features/column-sizing/columnSizingFeature.types.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts#L49) -Sets committed column sizing state using a value or updater. +Updates committed column sizing state with a next map or updater function. #### Parameters diff --git a/docs/reference/index/interfaces/Table_ColumnVisibility.md b/docs/reference/index/interfaces/Table_ColumnVisibility.md index 69278a3a84..42b5e8d65f 100644 --- a/docs/reference/index/interfaces/Table_ColumnVisibility.md +++ b/docs/reference/index/interfaces/Table_ColumnVisibility.md @@ -27,7 +27,7 @@ getIsAllColumnsVisible: () => boolean; Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L37) -Returns whether all columns are visible +Checks whether every leaf column is currently visible. #### Returns @@ -43,7 +43,7 @@ getIsSomeColumnsVisible: () => boolean; Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L41) -Returns whether any columns are visible +Checks whether at least one leaf column is currently visible. #### Returns @@ -59,7 +59,7 @@ getToggleAllColumnsVisibilityHandler: () => (event) => void; Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L45) -Returns a handler for toggling the visibility of all columns, meant to be bound to a `input[type=checkbox]` element. +Creates a checkbox-style handler that shows or hides all columns. #### Returns @@ -85,9 +85,10 @@ Returns a handler for toggling the visibility of all columns, meant to be bound getVisibleFlatColumns: () => Column[]; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L49) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L50) -Returns a flat array of columns that are visible, including parent columns. +Lists visible columns in flat table order, including parent columns that +have visible descendants. #### Returns @@ -101,9 +102,9 @@ Returns a flat array of columns that are visible, including parent columns. getVisibleLeafColumns: () => Column[]; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L53) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L54) -Returns a flat array of leaf-node columns that are visible. +Lists visible leaf columns in the order used for row cells and headers. #### Returns @@ -117,9 +118,11 @@ Returns a flat array of leaf-node columns that are visible. resetColumnVisibility: (defaultState?) => void; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L57) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L60) -Resets the column visibility state to the initial state. If `defaultState` is provided, the state will be reset to `{}` +Resets `columnVisibility` to `initialState.columnVisibility`. + +Pass `true` to ignore initial state and reset to `{}`. #### Parameters @@ -139,9 +142,9 @@ Resets the column visibility state to the initial state. If `defaultState` is pr setColumnVisibility: (updater) => void; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L61) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L64) -Sets column visibility state using a value or updater. +Updates column visibility state with a next map or updater function. #### Parameters @@ -161,7 +164,7 @@ Sets column visibility state using a value or updater. toggleAllColumnsVisible: (value?) => void; ``` -Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L65) +Defined in: [features/column-visibility/columnVisibilityFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts#L68) Toggles the visibility of all columns. diff --git a/docs/reference/index/interfaces/Table_Columns.md b/docs/reference/index/interfaces/Table_Columns.md index c3d3cb662a..a149f61ca4 100644 --- a/docs/reference/index/interfaces/Table_Columns.md +++ b/docs/reference/index/interfaces/Table_Columns.md @@ -5,7 +5,7 @@ title: Table_Columns # Interface: Table\_Columns\ -Defined in: [core/columns/coreColumnsFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L75) +Defined in: [core/columns/coreColumnsFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L76) ## Type Parameters @@ -25,9 +25,9 @@ Defined in: [core/columns/coreColumnsFeature.types.ts:75](https://github.com/Tan getAllColumns: () => Column[]; ``` -Defined in: [core/columns/coreColumnsFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L90) +Defined in: [core/columns/coreColumnsFeature.types.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L91) -Returns all columns in the table in their normalized and nested hierarchy. +Normalizes `options.columns` into the table's nested column hierarchy. #### Returns @@ -41,9 +41,9 @@ Returns all columns in the table in their normalized and nested hierarchy. getAllFlatColumns: () => Column[]; ``` -Defined in: [core/columns/coreColumnsFeature.types.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L94) +Defined in: [core/columns/coreColumnsFeature.types.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L95) -Returns all columns in the table flattened to a single level. +Flattens the nested column hierarchy, including parent/group columns. #### Returns @@ -57,7 +57,7 @@ Returns all columns in the table flattened to a single level. getAllFlatColumnsById: () => Record>; ``` -Defined in: [core/columns/coreColumnsFeature.types.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L82) +Defined in: [core/columns/coreColumnsFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L83) Returns a map of all flat columns by their ID. @@ -73,9 +73,9 @@ Returns a map of all flat columns by their ID. getAllLeafColumns: () => Column[]; ``` -Defined in: [core/columns/coreColumnsFeature.types.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L98) +Defined in: [core/columns/coreColumnsFeature.types.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L99) -Returns all leaf-node columns in the table flattened to a single level. This does not include parent columns. +Collects all terminal leaf columns, excluding parent/group columns. #### Returns @@ -89,7 +89,7 @@ Returns all leaf-node columns in the table flattened to a single level. This doe getAllLeafColumnsById: () => Record>; ``` -Defined in: [core/columns/coreColumnsFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L102) +Defined in: [core/columns/coreColumnsFeature.types.ts:103](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L103) Returns a map of all leaf-node columns by their ID. This does not include parent columns. @@ -107,7 +107,7 @@ getColumn: (columnId) => | undefined; ``` -Defined in: [core/columns/coreColumnsFeature.types.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L106) +Defined in: [core/columns/coreColumnsFeature.types.ts:107](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L107) Returns a single column by its ID. @@ -130,9 +130,9 @@ Returns a single column by its ID. getDefaultColumnDef: () => Partial>; ``` -Defined in: [core/columns/coreColumnsFeature.types.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L86) +Defined in: [core/columns/coreColumnsFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.types.ts#L87) -Returns the default column options to use for all column defs supplied to the table. +Resolves built-in, feature-level, and user-defined default column options. #### Returns diff --git a/docs/reference/index/interfaces/Table_CoreProperties.md b/docs/reference/index/interfaces/Table_CoreProperties.md index fe332e5137..7c609f1a27 100644 --- a/docs/reference/index/interfaces/Table_CoreProperties.md +++ b/docs/reference/index/interfaces/Table_CoreProperties.md @@ -5,7 +5,7 @@ title: Table_CoreProperties # Interface: Table\_CoreProperties\ -Defined in: [core/table/coreTablesFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L120) +Defined in: [core/table/coreTablesFeature.types.ts:124](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L124) ## Extended by @@ -29,7 +29,7 @@ Defined in: [core/table/coreTablesFeature.types.ts:120](https://github.com/TanSt optional _cellPrototype: object; ``` -Defined in: [core/table/coreTablesFeature.types.ts:131](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L131) +Defined in: [core/table/coreTablesFeature.types.ts:135](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L135) Prototype cache for Cell objects - shared by all cells in this table @@ -41,7 +41,7 @@ Prototype cache for Cell objects - shared by all cells in this table optional _columnPrototype: object; ``` -Defined in: [core/table/coreTablesFeature.types.ts:135](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L135) +Defined in: [core/table/coreTablesFeature.types.ts:139](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L139) Prototype cache for Column objects - shared by all columns in this table @@ -53,7 +53,7 @@ Prototype cache for Column objects - shared by all columns in this table readonly _features: Partial & TFeatures; ``` -Defined in: [core/table/coreTablesFeature.types.ts:139](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L139) +Defined in: [core/table/coreTablesFeature.types.ts:143](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L143) The features that are enabled for the table. @@ -65,7 +65,7 @@ The features that are enabled for the table. optional _headerPrototype: object; ``` -Defined in: [core/table/coreTablesFeature.types.ts:143](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L143) +Defined in: [core/table/coreTablesFeature.types.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L147) Prototype cache for Header objects - shared by all headers in this table @@ -77,7 +77,7 @@ Prototype cache for Header objects - shared by all headers in this table readonly _reactivity: TableReactivityBindings; ``` -Defined in: [core/table/coreTablesFeature.types.ts:127](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L127) +Defined in: [core/table/coreTablesFeature.types.ts:131](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L131) Table reactivity bindings for interacting with TanStack Store. @@ -89,7 +89,7 @@ Table reactivity bindings for interacting with TanStack Store. readonly _rowModelFns: RowModelFns; ``` -Defined in: [core/table/coreTablesFeature.types.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L147) +Defined in: [core/table/coreTablesFeature.types.ts:151](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L151) The row model processing functions that are used to process the data by features. @@ -101,7 +101,7 @@ The row model processing functions that are used to process the data by features readonly _rowModels: CachedRowModels; ``` -Defined in: [core/table/coreTablesFeature.types.ts:151](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L151) +Defined in: [core/table/coreTablesFeature.types.ts:155](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L155) The row models that are enabled for the table. @@ -113,7 +113,7 @@ The row models that are enabled for the table. optional _rowPrototype: object; ``` -Defined in: [core/table/coreTablesFeature.types.ts:155](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L155) +Defined in: [core/table/coreTablesFeature.types.ts:159](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L159) Prototype cache for Row objects - shared by all rows in this table @@ -125,7 +125,7 @@ Prototype cache for Row objects - shared by all rows in this table readonly atoms: Atoms; ``` -Defined in: [core/table/coreTablesFeature.types.ts:161](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L161) +Defined in: [core/table/coreTablesFeature.types.ts:165](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L165) The readonly derived atoms for each `TableState` slice. Each derives from its corresponding `baseAtom` plus, optionally, a per-slice external atom or @@ -139,7 +139,7 @@ external state value (precedence: external atom > external state > base atom). readonly baseAtoms: BaseAtoms; ``` -Defined in: [core/table/coreTablesFeature.types.ts:166](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L166) +Defined in: [core/table/coreTablesFeature.types.ts:170](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L170) The internal writable atoms for each `TableState` slice. This is the library's single write surface — all state mutations from features land here. @@ -152,7 +152,7 @@ single write surface — all state mutations from features land here. readonly initialState: TableState; ``` -Defined in: [core/table/coreTablesFeature.types.ts:170](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L170) +Defined in: [core/table/coreTablesFeature.types.ts:174](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L174) This is the resolved initial state of the table. @@ -164,7 +164,7 @@ This is the resolved initial state of the table. readonly options: TableOptions; ``` -Defined in: [core/table/coreTablesFeature.types.ts:174](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L174) +Defined in: [core/table/coreTablesFeature.types.ts:178](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L178) A read-only reference to the table's current options. @@ -176,7 +176,7 @@ A read-only reference to the table's current options. readonly optional optionsStore: Atom>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:180](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L180) +Defined in: [core/table/coreTablesFeature.types.ts:184](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L184) Writable atom for table options. Only created when `createOptionsStore` is true on the active core reactivity bindings. Adapters that opt out keep @@ -190,7 +190,7 @@ options as plain resolved data instead of backing them with an atom. readonly store: ReadonlyStore>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:185](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L185) +Defined in: [core/table/coreTablesFeature.types.ts:189](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L189) The readonly flat store for the table state. Derives from `table.atoms` only; never reads external state directly. diff --git a/docs/reference/index/interfaces/Table_GlobalFiltering.md b/docs/reference/index/interfaces/Table_GlobalFiltering.md index 97013e163e..4def897b00 100644 --- a/docs/reference/index/interfaces/Table_GlobalFiltering.md +++ b/docs/reference/index/interfaces/Table_GlobalFiltering.md @@ -5,7 +5,7 @@ title: Table_GlobalFiltering # Interface: Table\_GlobalFiltering\ -Defined in: [features/global-filtering/globalFilteringFeature.types.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L66) +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L69) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [features/global-filtering/globalFilteringFeature.types.ts:66](https getGlobalAutoFilterFn: () => FilterFn | undefined; ``` -Defined in: [features/global-filtering/globalFilteringFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L73) +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L76) Currently, this function returns the built-in `includesString` filter function. In future releases, it may return more dynamic filter functions based on the nature of the data provided. @@ -41,7 +41,7 @@ Currently, this function returns the built-in `includesString` filter function. getGlobalFilterFn: () => FilterFn | undefined; ``` -Defined in: [features/global-filtering/globalFilteringFeature.types.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L77) +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L80) Returns the filter function (either user-defined or automatic, depending on configuration) for the global filter. @@ -57,9 +57,11 @@ Returns the filter function (either user-defined or automatic, depending on conf resetGlobalFilter: (defaultState?) => void; ``` -Defined in: [features/global-filtering/globalFilteringFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L81) +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L86) -Resets the **globalFilter** state to `initialState.globalFilter`, or `true` can be passed to force a default blank state reset to `undefined`. +Resets `globalFilter` to `initialState.globalFilter`. + +Pass `true` to ignore initial state and reset to `undefined`. #### Parameters @@ -79,9 +81,9 @@ Resets the **globalFilter** state to `initialState.globalFilter`, or `true` can setGlobalFilter: (updater) => void; ``` -Defined in: [features/global-filtering/globalFilteringFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L85) +Defined in: [features/global-filtering/globalFilteringFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts#L90) -Sets global filter state using a value or updater. +Updates global filter state with a next value or updater function. #### Parameters diff --git a/docs/reference/index/interfaces/Table_Headers.md b/docs/reference/index/interfaces/Table_Headers.md index 96cd15bf66..55968b4048 100644 --- a/docs/reference/index/interfaces/Table_Headers.md +++ b/docs/reference/index/interfaces/Table_Headers.md @@ -25,9 +25,10 @@ Defined in: [core/headers/coreHeadersFeature.types.ts:8](https://github.com/TanS getFlatHeaders: () => Header[]; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L23) +Defined in: [core/headers/coreHeadersFeature.types.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L25) -Returns headers for all columns in the table, including parent headers. +Flattens every header from every header group, including parent and +placeholder headers. #### Returns @@ -41,9 +42,9 @@ Returns headers for all columns in the table, including parent headers. getFooterGroups: () => HeaderGroup[]; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L19) +Defined in: [core/headers/coreHeadersFeature.types.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L20) -Returns the footer groups for the table. +Builds footer groups by reversing the current header group order. #### Returns @@ -57,9 +58,10 @@ Returns the footer groups for the table. getHeaderGroups: () => HeaderGroup[]; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L15) +Defined in: [core/headers/coreHeadersFeature.types.ts:16](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L16) -Returns all header groups for the table. +Builds the visible header groups for the current column tree, visibility, +and pinning state. #### Returns @@ -73,9 +75,9 @@ Returns all header groups for the table. getLeafHeaders: () => Header[]; ``` -Defined in: [core/headers/coreHeadersFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L27) +Defined in: [core/headers/coreHeadersFeature.types.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.types.ts#L29) -Returns headers for all leaf columns in the table, (not including parent headers). +Collects only leaf headers, excluding parent/group headers. #### Returns diff --git a/docs/reference/index/interfaces/Table_RowExpanding.md b/docs/reference/index/interfaces/Table_RowExpanding.md index 3e8b25c82f..63561b8972 100644 --- a/docs/reference/index/interfaces/Table_RowExpanding.md +++ b/docs/reference/index/interfaces/Table_RowExpanding.md @@ -41,7 +41,7 @@ getCanSomeRowsExpand: () => boolean; Defined in: [features/row-expanding/rowExpandingFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L81) -Returns whether there are any rows that can be expanded. +Checks whether at least one row can be expanded. #### Returns @@ -57,7 +57,7 @@ getExpandedDepth: () => number; Defined in: [features/row-expanding/rowExpandingFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L85) -Returns the maximum depth of the expanded rows. +Computes the deepest expanded row id depth. #### Returns @@ -73,7 +73,7 @@ getIsAllRowsExpanded: () => boolean; Defined in: [features/row-expanding/rowExpandingFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L89) -Returns whether all rows are currently expanded. +Checks whether all rows in the current row model are expanded. #### Returns @@ -89,7 +89,7 @@ getIsSomeRowsExpanded: () => boolean; Defined in: [features/row-expanding/rowExpandingFeature.types.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L93) -Returns whether there are any rows that are currently expanded. +Checks whether any row is currently expanded. #### Returns @@ -105,7 +105,7 @@ getToggleAllRowsExpandedHandler: () => (event) => void; Defined in: [features/row-expanding/rowExpandingFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L97) -Returns a handler that can be used to toggle the expanded state of all rows. This handler is meant to be used with an `input[type=checkbox]` element. +Creates a handler that toggles all rows expanded. #### Returns @@ -131,10 +131,11 @@ Returns a handler that can be used to toggle the expanded state of all rows. Thi resetExpanded: (defaultState?) => void; ``` -Defined in: [features/row-expanding/rowExpandingFeature.types.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L102) +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:103](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L103) -Resets expanded state to `initialState.expanded`. Pass `true` to reset to -the feature default of `{}`. +Resets `expanded` to `initialState.expanded`. + +Pass `true` to ignore initial state and reset to `{}`. #### Parameters @@ -154,9 +155,9 @@ the feature default of `{}`. setExpanded: (updater) => void; ``` -Defined in: [features/row-expanding/rowExpandingFeature.types.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L106) +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:107](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L107) -Sets expanded state using a value or updater. +Updates expanded state with `true`, a row-id map, or an updater function. #### Parameters @@ -176,7 +177,7 @@ Sets expanded state using a value or updater. toggleAllRowsExpanded: (expanded?) => void; ``` -Defined in: [features/row-expanding/rowExpandingFeature.types.ts:110](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L110) +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:111](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L111) Toggles the expanded state for all rows. diff --git a/docs/reference/index/interfaces/Table_RowModels_Expanded.md b/docs/reference/index/interfaces/Table_RowModels_Expanded.md index 49e884b347..1e434bd652 100644 --- a/docs/reference/index/interfaces/Table_RowModels_Expanded.md +++ b/docs/reference/index/interfaces/Table_RowModels_Expanded.md @@ -5,7 +5,7 @@ title: Table_RowModels_Expanded # Interface: Table\_RowModels\_Expanded\ -Defined in: [features/row-expanding/rowExpandingFeature.types.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L113) +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:114](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L114) ## Type Parameters @@ -25,9 +25,9 @@ Defined in: [features/row-expanding/rowExpandingFeature.types.ts:113](https://gi getExpandedRowModel: () => RowModel; ``` -Defined in: [features/row-expanding/rowExpandingFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L120) +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:121](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L121) -Returns the row model after expansion has been applied. +Resolves the row model after expanded rows have been flattened into view. #### Returns @@ -41,9 +41,9 @@ Returns the row model after expansion has been applied. getPreExpandedRowModel: () => RowModel; ``` -Defined in: [features/row-expanding/rowExpandingFeature.types.ts:124](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L124) +Defined in: [features/row-expanding/rowExpandingFeature.types.ts:125](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts#L125) -Returns the row model before expansion has been applied. +Reads the row model immediately before expansion. #### Returns diff --git a/docs/reference/index/interfaces/Table_RowModels_Faceted.md b/docs/reference/index/interfaces/Table_RowModels_Faceted.md index 6c211f4228..f9156ec438 100644 --- a/docs/reference/index/interfaces/Table_RowModels_Faceted.md +++ b/docs/reference/index/interfaces/Table_RowModels_Faceted.md @@ -5,7 +5,7 @@ title: Table_RowModels_Faceted # Interface: Table\_RowModels\_Faceted\ -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L24) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L27) ## Type Parameters @@ -25,10 +25,11 @@ Defined in: [features/column-faceting/columnFacetingFeature.types.ts:24](https:/ getFacetedMinMaxValues: () => [number, number] | undefined; ``` -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L32) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L36) -A function that **computes and returns** a min/max tuple derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. -> Requires that you pass a valid `facetedMinMaxValues` row model factory in `_rowModels`. A default implementation is provided via the exported `createFacetedMinMaxValues` function. +Computes min/max numeric facet values for the active faceting context. + +Requires a `facetedMinMaxValues` row-model factory in `_rowModels`. #### Returns @@ -42,10 +43,11 @@ A function that **computes and returns** a min/max tuple derived from `column.ge getFacetedRowModel: () => RowModel; ``` -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L37) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L42) + +Computes the row model used to derive facet values. -Returns the row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts. -> Requires that you pass a valid `facetedRowModel` row model factory in `_rowModels`. A default implementation is provided via the exported `createFacetedRowModel` function. +Requires a `facetedRowModel` row-model factory in `_rowModels`. #### Returns @@ -59,10 +61,11 @@ Returns the row model with all other column filters applied, excluding its own f getFacetedUniqueValues: () => Map; ``` -Defined in: [features/column-faceting/columnFacetingFeature.types.ts:42](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L42) +Defined in: [features/column-faceting/columnFacetingFeature.types.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts#L48) + +Computes unique facet values and occurrence counts. -A function that **computes and returns** a `Map` of unique values and their occurrences derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. -> Requires that you pass a valid `facetedUniqueValues` row model factory in `_rowModels`. A default implementation is provided via the exported `createFacetedUniqueValues` function. +Requires a `facetedUniqueValues` row-model factory in `_rowModels`. #### Returns diff --git a/docs/reference/index/interfaces/Table_RowModels_Filtered.md b/docs/reference/index/interfaces/Table_RowModels_Filtered.md index a0e8e02edc..14c348a54e 100644 --- a/docs/reference/index/interfaces/Table_RowModels_Filtered.md +++ b/docs/reference/index/interfaces/Table_RowModels_Filtered.md @@ -5,7 +5,7 @@ title: Table_RowModels_Filtered # Interface: Table\_RowModels\_Filtered\ -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:188](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L188) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:198](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L198) ## Type Parameters @@ -25,9 +25,9 @@ Defined in: [features/column-filtering/columnFilteringFeature.types.ts:188](http getFilteredRowModel: () => RowModel; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:195](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L195) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:205](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L205) -Returns the row model for the table after **column** filtering has been applied. +Resolves the row model after column and global filters have been applied. #### Returns @@ -41,9 +41,9 @@ Returns the row model for the table after **column** filtering has been applied. getPreFilteredRowModel: () => RowModel; ``` -Defined in: [features/column-filtering/columnFilteringFeature.types.ts:199](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L199) +Defined in: [features/column-filtering/columnFilteringFeature.types.ts:209](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts#L209) -Returns the row model for the table before any **column** filtering has been applied. +Reads the row model immediately before filtering. #### Returns diff --git a/docs/reference/index/interfaces/Table_RowModels_Grouped.md b/docs/reference/index/interfaces/Table_RowModels_Grouped.md index 8c2cd04a8c..8b689565e3 100644 --- a/docs/reference/index/interfaces/Table_RowModels_Grouped.md +++ b/docs/reference/index/interfaces/Table_RowModels_Grouped.md @@ -5,7 +5,7 @@ title: Table_RowModels_Grouped # Interface: Table\_RowModels\_Grouped\ -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:189](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L189) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:193](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L193) ## Type Parameters @@ -25,9 +25,9 @@ Defined in: [features/column-grouping/columnGroupingFeature.types.ts:189](https: getGroupedRowModel: () => RowModel; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:196](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L196) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:200](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L200) -Returns the row model for the table after grouping has been applied. +Resolves the row model after grouping and aggregation have been applied. #### Returns @@ -41,9 +41,9 @@ Returns the row model for the table after grouping has been applied. getPreGroupedRowModel: () => RowModel; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:200](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L200) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:204](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L204) -Returns the row model for the table before any grouping has been applied. +Reads the row model immediately before grouping. #### Returns diff --git a/docs/reference/index/interfaces/Table_RowModels_Paginated.md b/docs/reference/index/interfaces/Table_RowModels_Paginated.md index 5f79059b37..6d4f6b666d 100644 --- a/docs/reference/index/interfaces/Table_RowModels_Paginated.md +++ b/docs/reference/index/interfaces/Table_RowModels_Paginated.md @@ -5,7 +5,7 @@ title: Table_RowModels_Paginated # Interface: Table\_RowModels\_Paginated\ -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L112) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L119) ## Type Parameters @@ -25,9 +25,9 @@ Defined in: [features/row-pagination/rowPaginationFeature.types.ts:112](https:// getPaginatedRowModel: () => RowModel; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L119) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L126) -Returns the row model for the table after pagination has been applied. +Resolves the row model after pagination has sliced the current page. #### Returns @@ -41,9 +41,9 @@ Returns the row model for the table after pagination has been applied. getPrePaginatedRowModel: () => RowModel; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:123](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L123) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L130) -Returns the row model for the table before any pagination has been applied. +Reads the row model immediately before pagination. #### Returns diff --git a/docs/reference/index/interfaces/Table_RowModels_Sorted.md b/docs/reference/index/interfaces/Table_RowModels_Sorted.md index e7f7f6c455..ae7d6a3d5c 100644 --- a/docs/reference/index/interfaces/Table_RowModels_Sorted.md +++ b/docs/reference/index/interfaces/Table_RowModels_Sorted.md @@ -5,7 +5,7 @@ title: Table_RowModels_Sorted # Interface: Table\_RowModels\_Sorted\ -Defined in: [features/row-sorting/rowSortingFeature.types.ts:200](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L200) +Defined in: [features/row-sorting/rowSortingFeature.types.ts:202](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L202) ## Type Parameters @@ -25,9 +25,9 @@ Defined in: [features/row-sorting/rowSortingFeature.types.ts:200](https://github getPreSortedRowModel: () => RowModel; ``` -Defined in: [features/row-sorting/rowSortingFeature.types.ts:207](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L207) +Defined in: [features/row-sorting/rowSortingFeature.types.ts:209](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L209) -Returns the row model for the table before any sorting has been applied. +Reads the row model immediately before sorting. #### Returns @@ -41,9 +41,9 @@ Returns the row model for the table before any sorting has been applied. getSortedRowModel: () => RowModel; ``` -Defined in: [features/row-sorting/rowSortingFeature.types.ts:211](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L211) +Defined in: [features/row-sorting/rowSortingFeature.types.ts:213](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L213) -Returns the row model for the table after sorting has been applied. +Resolves the row model after sorting has been applied. #### Returns diff --git a/docs/reference/index/interfaces/Table_RowPagination.md b/docs/reference/index/interfaces/Table_RowPagination.md index 2b71f842bf..2b65b620aa 100644 --- a/docs/reference/index/interfaces/Table_RowPagination.md +++ b/docs/reference/index/interfaces/Table_RowPagination.md @@ -39,7 +39,7 @@ Defined in: [features/row-pagination/rowPaginationFeature.types.ts:48](https://g firstPage: () => void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L80) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L83) Sets the page index to `0`. @@ -57,7 +57,7 @@ getCanNextPage: () => boolean; Defined in: [features/row-pagination/rowPaginationFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L52) -Returns whether the table can go to the next page. +Checks whether the current page index can move forward. #### Returns @@ -73,7 +73,7 @@ getCanPreviousPage: () => boolean; Defined in: [features/row-pagination/rowPaginationFeature.types.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L56) -Returns whether the table can go to the previous page. +Checks whether the current page index can move backward. #### Returns @@ -87,9 +87,10 @@ Returns whether the table can go to the previous page. getPageCount: () => number; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:60](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L60) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L61) -Returns the page count. If manually paginating or controlling the pagination state, this will come directly from the `options.pageCount` table option, otherwise it will be calculated from the table data using the total row count and current page size. +Resolves the current page count from `options.pageCount` or row count and +page size. #### Returns @@ -103,9 +104,9 @@ Returns the page count. If manually paginating or controlling the pagination sta getPageOptions: () => number[]; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L68) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:71](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L71) -Returns an array of page options (zero-index-based) for the current page size. +Builds zero-based page indexes for the current page count. #### Returns @@ -119,9 +120,11 @@ Returns an array of page options (zero-index-based) for the current page size. getRowCount: () => number; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L64) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L67) -Returns the row count. If manually paginating or controlling the pagination state, this will come directly from the `options.rowCount` table option, otherwise it will be calculated from the table data. +Resolves the row count used for pagination math. + +`options.rowCount` wins; otherwise the pre-paginated row model is counted. #### Returns @@ -135,7 +138,7 @@ Returns the row count. If manually paginating or controlling the pagination stat lastPage: () => void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L84) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L87) Sets the page index to the last page. @@ -151,7 +154,7 @@ Sets the page index to the last page. nextPage: () => void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L72) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L75) Increments the page index by one, if possible. @@ -167,7 +170,7 @@ Increments the page index by one, if possible. previousPage: () => void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L76) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L79) Decrements the page index by one, if possible. @@ -183,9 +186,10 @@ Decrements the page index by one, if possible. resetPageIndex: (defaultState?) => void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L88) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L92) -Resets the page index to its initial state. If `defaultState` is `true`, the page index will be reset to `0` regardless of initial state. +Resets `pagination.pageIndex` to initial state, or to `0` when +`defaultState` is `true`. #### Parameters @@ -205,9 +209,10 @@ Resets the page index to its initial state. If `defaultState` is `true`, the pag resetPageSize: (defaultState?) => void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L92) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L97) -Resets the page size to its initial state. If `defaultState` is `true`, the page size will be reset to `10` regardless of initial state. +Resets `pagination.pageSize` to initial state, or to `10` when +`defaultState` is `true`. #### Parameters @@ -227,10 +232,12 @@ Resets the page size to its initial state. If `defaultState` is `true`, the page resetPagination: (defaultState?) => void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L97) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L104) + +Resets `pagination` to `initialState.pagination`. -Resets pagination state to `initialState.pagination`. Pass `true` to reset -to the feature default of `{ pageIndex: 0, pageSize: 10 }`. +Pass `true` to ignore initial state and reset to +`{ pageIndex: 0, pageSize: 10 }`. #### Parameters @@ -250,7 +257,7 @@ to the feature default of `{ pageIndex: 0, pageSize: 10 }`. setPageIndex: (updater) => void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L101) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L108) Updates `pagination.pageIndex` using a value or updater. @@ -272,7 +279,7 @@ Updates `pagination.pageIndex` using a value or updater. setPageSize: (updater) => void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L105) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L112) Updates `pagination.pageSize` using a value or updater. @@ -294,9 +301,9 @@ Updates `pagination.pageSize` using a value or updater. setPagination: (updater) => void; ``` -Defined in: [features/row-pagination/rowPaginationFeature.types.ts:109](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L109) +Defined in: [features/row-pagination/rowPaginationFeature.types.ts:116](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts#L116) -Sets pagination state using a value or updater. +Updates pagination state with a next state or updater function. #### Parameters diff --git a/docs/reference/index/interfaces/Table_RowPinning.md b/docs/reference/index/interfaces/Table_RowPinning.md index c7da49f21a..72e14b1c4c 100644 --- a/docs/reference/index/interfaces/Table_RowPinning.md +++ b/docs/reference/index/interfaces/Table_RowPinning.md @@ -5,7 +5,7 @@ title: Table_RowPinning # Interface: Table\_RowPinning\ -Defined in: [features/row-pinning/rowPinningFeature.types.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L63) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L65) ## Type Parameters @@ -25,9 +25,9 @@ Defined in: [features/row-pinning/rowPinningFeature.types.ts:63](https://github. getBottomRows: () => Row[]; ``` -Defined in: [features/row-pinning/rowPinningFeature.types.ts:70](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L70) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L72) -Returns all bottom pinned rows. +Gets rows pinned to the bottom region. #### Returns @@ -41,9 +41,9 @@ Returns all bottom pinned rows. getCenterRows: () => Row[]; ``` -Defined in: [features/row-pinning/rowPinningFeature.types.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L74) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L76) -Returns all rows that are not pinned to the top or bottom. +Gets rows that are not pinned to the top or bottom region. #### Returns @@ -57,9 +57,9 @@ Returns all rows that are not pinned to the top or bottom. getIsSomeRowsPinned: (position?) => boolean; ``` -Defined in: [features/row-pinning/rowPinningFeature.types.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L78) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L80) -Returns whether or not any rows are pinned. Optionally specify to only check for pinned rows in either the `top` or `bottom` position. +Checks whether any rows are pinned, optionally limited to one region. #### Parameters @@ -79,9 +79,9 @@ Returns whether or not any rows are pinned. Optionally specify to only check for getTopRows: () => Row[]; ``` -Defined in: [features/row-pinning/rowPinningFeature.types.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L82) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L84) -Returns all top pinned rows. +Gets rows pinned to the top region. #### Returns @@ -95,9 +95,11 @@ Returns all top pinned rows. resetRowPinning: (defaultState?) => void; ``` -Defined in: [features/row-pinning/rowPinningFeature.types.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L86) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L90) + +Resets `rowPinning` to `initialState.rowPinning`. -Resets the **rowPinning** state to `initialState.rowPinning`, or `true` can be passed to force a default blank state reset to `{ top: [], bottom: [], }`. +Pass `true` to ignore initial state and reset to empty top/bottom arrays. #### Parameters @@ -117,9 +119,9 @@ Resets the **rowPinning** state to `initialState.rowPinning`, or `true` can be p setRowPinning: (updater) => void; ``` -Defined in: [features/row-pinning/rowPinningFeature.types.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L90) +Defined in: [features/row-pinning/rowPinningFeature.types.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts#L94) -Sets row pinning state using a value or updater. +Updates row pinning state with a next state or updater function. #### Parameters diff --git a/docs/reference/index/interfaces/Table_RowSelection.md b/docs/reference/index/interfaces/Table_RowSelection.md index 73129a7d58..0b804bc403 100644 --- a/docs/reference/index/interfaces/Table_RowSelection.md +++ b/docs/reference/index/interfaces/Table_RowSelection.md @@ -5,7 +5,7 @@ title: Table_RowSelection # Interface: Table\_RowSelection\ -Defined in: [features/row-selection/rowSelectionFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L85) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L89) ## Type Parameters @@ -25,9 +25,9 @@ Defined in: [features/row-selection/rowSelectionFeature.types.ts:85](https://git getFilteredSelectedRowModel: () => RowModel; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L92) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L96) -Returns the row model of all rows that are selected after filtering has been applied. +Builds a selected-row model from rows after filtering. #### Returns @@ -41,9 +41,9 @@ Returns the row model of all rows that are selected after filtering has been app getGroupedSelectedRowModel: () => RowModel; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L96) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L100) -Returns the row model of all rows that are selected after grouping has been applied. +Builds a selected-row model from rows after grouping. #### Returns @@ -57,9 +57,9 @@ Returns the row model of all rows that are selected after grouping has been appl getIsAllPageRowsSelected: () => boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L100) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L104) -Returns whether or not all rows on the current page are selected. +Checks whether every selectable row on the current page is selected. #### Returns @@ -73,9 +73,9 @@ Returns whether or not all rows on the current page are selected. getIsAllRowsSelected: () => boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L104) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L108) -Returns whether or not all rows in the table are selected. +Checks whether every selectable filtered row is selected. #### Returns @@ -89,9 +89,9 @@ Returns whether or not all rows in the table are selected. getIsSomePageRowsSelected: () => boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L108) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L112) -Returns whether or not any rows on the current page are selected. +Checks whether the current page has a partial row selection. #### Returns @@ -105,9 +105,9 @@ Returns whether or not any rows on the current page are selected. getIsSomeRowsSelected: () => boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L112) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:116](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L116) -Returns whether or not any rows in the table are selected. +Checks whether filtered rows have a partial row selection. #### Returns @@ -121,7 +121,7 @@ Returns whether or not any rows in the table are selected. getPreSelectedRowModel: () => RowModel; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:116](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L116) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L120) Returns the core row model of all rows before row selection has been applied. @@ -137,9 +137,9 @@ Returns the core row model of all rows before row selection has been applied. getSelectedRowModel: () => RowModel; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L120) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:124](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L124) -Returns the row model of all rows that are selected. +Builds a selected-row model from the core row model. #### Returns @@ -153,9 +153,9 @@ Returns the row model of all rows that are selected. getToggleAllPageRowsSelectedHandler: () => (event) => void; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:124](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L124) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:128](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L128) -Returns a handler that can be used to toggle all rows on the current page. +Creates a checkbox-style handler that toggles all current-page rows. #### Returns @@ -181,9 +181,9 @@ Returns a handler that can be used to toggle all rows on the current page. getToggleAllRowsSelectedHandler: () => (event) => void; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:128](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L128) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:132](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L132) -Returns a handler that can be used to toggle all rows in the table. +Creates a checkbox-style handler that toggles all selectable rows. #### Returns @@ -209,9 +209,11 @@ Returns a handler that can be used to toggle all rows in the table. resetRowSelection: (defaultState?) => void; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:132](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L132) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:138](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L138) + +Resets `rowSelection` to `initialState.rowSelection`. -Resets the **rowSelection** state to the `initialState.rowSelection`, or `true` can be passed to force a default blank state reset to `{}`. +Pass `true` to ignore initial state and reset to `{}`. #### Parameters @@ -231,9 +233,9 @@ Resets the **rowSelection** state to the `initialState.rowSelection`, or `true` setRowSelection: (updater) => void; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L136) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:142](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L142) -Sets row selection state using a value or updater. +Updates row selection state with a next map or updater function. #### Parameters @@ -253,7 +255,7 @@ Sets row selection state using a value or updater. toggleAllPageRowsSelected: (value?) => void; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L140) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:146](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L146) Selects/deselects all rows on the current page. @@ -275,7 +277,7 @@ Selects/deselects all rows on the current page. toggleAllRowsSelected: (value?) => void; ``` -Defined in: [features/row-selection/rowSelectionFeature.types.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L144) +Defined in: [features/row-selection/rowSelectionFeature.types.ts:150](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L150) Selects/deselects all rows in the table. diff --git a/docs/reference/index/interfaces/Table_RowSorting.md b/docs/reference/index/interfaces/Table_RowSorting.md index 2fc1ab2f87..5dc30b4674 100644 --- a/docs/reference/index/interfaces/Table_RowSorting.md +++ b/docs/reference/index/interfaces/Table_RowSorting.md @@ -25,9 +25,11 @@ Defined in: [features/row-sorting/rowSortingFeature.types.ts:186](https://github resetSorting: (defaultState?) => void; ``` -Defined in: [features/row-sorting/rowSortingFeature.types.ts:193](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L193) +Defined in: [features/row-sorting/rowSortingFeature.types.ts:195](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L195) -Resets the **sorting** state to `initialState.sorting`, or `true` can be passed to force a default blank state reset to `[]`. +Resets `sorting` to `initialState.sorting`. + +Pass `true` to ignore initial state and reset to `[]`. #### Parameters @@ -47,9 +49,9 @@ Resets the **sorting** state to `initialState.sorting`, or `true` can be passed setSorting: (updater) => void; ``` -Defined in: [features/row-sorting/rowSortingFeature.types.ts:197](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L197) +Defined in: [features/row-sorting/rowSortingFeature.types.ts:199](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts#L199) -Sets sorting state using a value or updater. +Updates sorting state with a next ordered array or updater function. #### Parameters diff --git a/docs/reference/index/interfaces/Table_Table.md b/docs/reference/index/interfaces/Table_Table.md index b8d7234f86..04b9454597 100644 --- a/docs/reference/index/interfaces/Table_Table.md +++ b/docs/reference/index/interfaces/Table_Table.md @@ -5,7 +5,7 @@ title: Table_Table # Interface: Table\_Table\ -Defined in: [core/table/coreTablesFeature.types.ts:188](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L188) +Defined in: [core/table/coreTablesFeature.types.ts:192](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L192) ## Extends @@ -29,7 +29,7 @@ Defined in: [core/table/coreTablesFeature.types.ts:188](https://github.com/TanSt optional _cellPrototype: object; ``` -Defined in: [core/table/coreTablesFeature.types.ts:131](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L131) +Defined in: [core/table/coreTablesFeature.types.ts:135](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L135) Prototype cache for Cell objects - shared by all cells in this table @@ -45,7 +45,7 @@ Prototype cache for Cell objects - shared by all cells in this table optional _columnPrototype: object; ``` -Defined in: [core/table/coreTablesFeature.types.ts:135](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L135) +Defined in: [core/table/coreTablesFeature.types.ts:139](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L139) Prototype cache for Column objects - shared by all columns in this table @@ -61,7 +61,7 @@ Prototype cache for Column objects - shared by all columns in this table readonly _features: Partial & TFeatures; ``` -Defined in: [core/table/coreTablesFeature.types.ts:139](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L139) +Defined in: [core/table/coreTablesFeature.types.ts:143](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L143) The features that are enabled for the table. @@ -77,7 +77,7 @@ The features that are enabled for the table. optional _headerPrototype: object; ``` -Defined in: [core/table/coreTablesFeature.types.ts:143](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L143) +Defined in: [core/table/coreTablesFeature.types.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L147) Prototype cache for Header objects - shared by all headers in this table @@ -93,7 +93,7 @@ Prototype cache for Header objects - shared by all headers in this table readonly _reactivity: TableReactivityBindings; ``` -Defined in: [core/table/coreTablesFeature.types.ts:127](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L127) +Defined in: [core/table/coreTablesFeature.types.ts:131](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L131) Table reactivity bindings for interacting with TanStack Store. @@ -109,7 +109,7 @@ Table reactivity bindings for interacting with TanStack Store. readonly _rowModelFns: RowModelFns; ``` -Defined in: [core/table/coreTablesFeature.types.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L147) +Defined in: [core/table/coreTablesFeature.types.ts:151](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L151) The row model processing functions that are used to process the data by features. @@ -125,7 +125,7 @@ The row model processing functions that are used to process the data by features readonly _rowModels: CachedRowModels; ``` -Defined in: [core/table/coreTablesFeature.types.ts:151](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L151) +Defined in: [core/table/coreTablesFeature.types.ts:155](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L155) The row models that are enabled for the table. @@ -141,7 +141,7 @@ The row models that are enabled for the table. optional _rowPrototype: object; ``` -Defined in: [core/table/coreTablesFeature.types.ts:155](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L155) +Defined in: [core/table/coreTablesFeature.types.ts:159](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L159) Prototype cache for Row objects - shared by all rows in this table @@ -157,7 +157,7 @@ Prototype cache for Row objects - shared by all rows in this table readonly atoms: Atoms; ``` -Defined in: [core/table/coreTablesFeature.types.ts:161](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L161) +Defined in: [core/table/coreTablesFeature.types.ts:165](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L165) The readonly derived atoms for each `TableState` slice. Each derives from its corresponding `baseAtom` plus, optionally, a per-slice external atom or @@ -175,7 +175,7 @@ external state value (precedence: external atom > external state > base atom). readonly baseAtoms: BaseAtoms; ``` -Defined in: [core/table/coreTablesFeature.types.ts:166](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L166) +Defined in: [core/table/coreTablesFeature.types.ts:170](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L170) The internal writable atoms for each `TableState` slice. This is the library's single write surface — all state mutations from features land here. @@ -192,7 +192,7 @@ single write surface — all state mutations from features land here. readonly initialState: TableState; ``` -Defined in: [core/table/coreTablesFeature.types.ts:170](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L170) +Defined in: [core/table/coreTablesFeature.types.ts:174](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L174) This is the resolved initial state of the table. @@ -208,7 +208,7 @@ This is the resolved initial state of the table. readonly options: TableOptions; ``` -Defined in: [core/table/coreTablesFeature.types.ts:174](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L174) +Defined in: [core/table/coreTablesFeature.types.ts:178](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L178) A read-only reference to the table's current options. @@ -224,7 +224,7 @@ A read-only reference to the table's current options. readonly optional optionsStore: Atom>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:180](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L180) +Defined in: [core/table/coreTablesFeature.types.ts:184](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L184) Writable atom for table options. Only created when `createOptionsStore` is true on the active core reactivity bindings. Adapters that opt out keep @@ -242,7 +242,7 @@ options as plain resolved data instead of backing them with an atom. reset: () => void; ``` -Defined in: [core/table/coreTablesFeature.types.ts:199](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L199) +Defined in: [core/table/coreTablesFeature.types.ts:203](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L203) Resets the table's internal base atoms to `table.initialState`. @@ -262,7 +262,7 @@ reset behavior. setOptions: (newOptions) => void; ``` -Defined in: [core/table/coreTablesFeature.types.ts:204](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L204) +Defined in: [core/table/coreTablesFeature.types.ts:208](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L208) Updates the table options by applying a value or updater to the current resolved options and then merging them through `options.mergeOptions`. @@ -285,7 +285,7 @@ resolved options and then merging them through `options.mergeOptions`. readonly store: ReadonlyStore>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:185](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L185) +Defined in: [core/table/coreTablesFeature.types.ts:189](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L189) The readonly flat store for the table state. Derives from `table.atoms` only; never reads external state directly. diff --git a/docs/reference/index/namespaces/filterFn_arrIncludes/functions/autoRemove.md b/docs/reference/index/namespaces/filterFn_arrIncludes/functions/autoRemove.md index e2b8ab07c2..b1b4ad9db1 100644 --- a/docs/reference/index/namespaces/filterFn_arrIncludes/functions/autoRemove.md +++ b/docs/reference/index/namespaces/filterFn_arrIncludes/functions/autoRemove.md @@ -9,7 +9,7 @@ title: autoRemove function autoRemove(val): boolean; ``` -Defined in: [fns/filterFns.ts:316](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L316) +Defined in: [fns/filterFns.ts:347](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L347) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_arrIncludes/index.md b/docs/reference/index/namespaces/filterFn_arrIncludes/index.md index 39dbc36047..f264a1195e 100644 --- a/docs/reference/index/namespaces/filterFn_arrIncludes/index.md +++ b/docs/reference/index/namespaces/filterFn_arrIncludes/index.md @@ -5,7 +5,7 @@ title: filterFn_arrIncludes # filterFn\_arrIncludes -Filter function for checking if an array includes a given value. +Keeps rows whose array or string column value includes at least one filter value. ## Functions diff --git a/docs/reference/index/namespaces/filterFn_arrIncludesAll/functions/autoRemove.md b/docs/reference/index/namespaces/filterFn_arrIncludesAll/functions/autoRemove.md index 6749ac0134..7385f140d1 100644 --- a/docs/reference/index/namespaces/filterFn_arrIncludesAll/functions/autoRemove.md +++ b/docs/reference/index/namespaces/filterFn_arrIncludesAll/functions/autoRemove.md @@ -9,7 +9,7 @@ title: autoRemove function autoRemove(val): boolean; ``` -Defined in: [fns/filterFns.ts:334](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L334) +Defined in: [fns/filterFns.ts:365](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L365) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_arrIncludesAll/index.md b/docs/reference/index/namespaces/filterFn_arrIncludesAll/index.md index ee2ffb6838..6fdafc67f4 100644 --- a/docs/reference/index/namespaces/filterFn_arrIncludesAll/index.md +++ b/docs/reference/index/namespaces/filterFn_arrIncludesAll/index.md @@ -5,7 +5,7 @@ title: filterFn_arrIncludesAll # filterFn\_arrIncludesAll -Filter function for checking if an array includes all of the given values. +Keeps rows whose array column value includes every filter value. ## Functions diff --git a/docs/reference/index/namespaces/filterFn_arrIncludesSome/functions/autoRemove.md b/docs/reference/index/namespaces/filterFn_arrIncludesSome/functions/autoRemove.md index 5c8129fd1a..bd268d2f60 100644 --- a/docs/reference/index/namespaces/filterFn_arrIncludesSome/functions/autoRemove.md +++ b/docs/reference/index/namespaces/filterFn_arrIncludesSome/functions/autoRemove.md @@ -9,7 +9,7 @@ title: autoRemove function autoRemove(val): boolean; ``` -Defined in: [fns/filterFns.ts:353](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L353) +Defined in: [fns/filterFns.ts:384](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L384) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_arrIncludesSome/index.md b/docs/reference/index/namespaces/filterFn_arrIncludesSome/index.md index 6e7440d236..f618b4a6ac 100644 --- a/docs/reference/index/namespaces/filterFn_arrIncludesSome/index.md +++ b/docs/reference/index/namespaces/filterFn_arrIncludesSome/index.md @@ -5,7 +5,7 @@ title: filterFn_arrIncludesSome # filterFn\_arrIncludesSome -Filter function for checking if an array includes any of the given values. +Keeps rows whose array column value includes at least one filter value. ## Functions diff --git a/docs/reference/index/namespaces/filterFn_equals/functions/autoRemove.md b/docs/reference/index/namespaces/filterFn_equals/functions/autoRemove.md index 4215c8844e..d5835237a6 100644 --- a/docs/reference/index/namespaces/filterFn_equals/functions/autoRemove.md +++ b/docs/reference/index/namespaces/filterFn_equals/functions/autoRemove.md @@ -9,7 +9,7 @@ title: autoRemove function autoRemove(val): boolean; ``` -Defined in: [fns/filterFns.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L22) +Defined in: [fns/filterFns.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L24) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_equals/index.md b/docs/reference/index/namespaces/filterFn_equals/index.md index a84b3749fa..a3fc48e8b7 100644 --- a/docs/reference/index/namespaces/filterFn_equals/index.md +++ b/docs/reference/index/namespaces/filterFn_equals/index.md @@ -5,7 +5,9 @@ title: filterFn_equals # filterFn\_equals -Filter function for checking if a value is exactly equal to a given value. (JS === comparison) +Keeps rows whose column value is strictly equal to the filter value. + +Uses JavaScript `===` comparison and auto-removes empty filter values. ## Functions diff --git a/docs/reference/index/namespaces/filterFn_equalsString/functions/autoRemove.md b/docs/reference/index/namespaces/filterFn_equalsString/functions/autoRemove.md index 3007b1e7db..d3198260a1 100644 --- a/docs/reference/index/namespaces/filterFn_equalsString/functions/autoRemove.md +++ b/docs/reference/index/namespaces/filterFn_equalsString/functions/autoRemove.md @@ -9,7 +9,7 @@ title: autoRemove function autoRemove(val): boolean; ``` -Defined in: [fns/filterFns.ts:99](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L99) +Defined in: [fns/filterFns.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L112) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_equalsString/index.md b/docs/reference/index/namespaces/filterFn_equalsString/index.md index f1b1984393..3390f1eb16 100644 --- a/docs/reference/index/namespaces/filterFn_equalsString/index.md +++ b/docs/reference/index/namespaces/filterFn_equalsString/index.md @@ -5,7 +5,10 @@ title: filterFn_equalsString # filterFn\_equalsString -Filter function for checking if a string is exactly equal to a given string. (Non-case-sensitive) +Keeps rows whose stringified column value equals the filter text. + +Both values are lowercased before comparison, and empty filter values are +auto-removed. ## Functions diff --git a/docs/reference/index/namespaces/filterFn_equalsStringSensitive/functions/autoRemove.md b/docs/reference/index/namespaces/filterFn_equalsStringSensitive/functions/autoRemove.md index 8700832f1e..3cea653817 100644 --- a/docs/reference/index/namespaces/filterFn_equalsStringSensitive/functions/autoRemove.md +++ b/docs/reference/index/namespaces/filterFn_equalsStringSensitive/functions/autoRemove.md @@ -9,7 +9,7 @@ title: autoRemove function autoRemove(val): boolean; ``` -Defined in: [fns/filterFns.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L115) +Defined in: [fns/filterFns.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L130) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_equalsStringSensitive/index.md b/docs/reference/index/namespaces/filterFn_equalsStringSensitive/index.md index bf99c06b65..de98608f7e 100644 --- a/docs/reference/index/namespaces/filterFn_equalsStringSensitive/index.md +++ b/docs/reference/index/namespaces/filterFn_equalsStringSensitive/index.md @@ -5,7 +5,9 @@ title: filterFn_equalsStringSensitive # filterFn\_equalsStringSensitive -Filter function for checking if a string is exactly equal to a given string. (Case-sensitive) +Keeps rows whose stringified column value exactly equals the filter text. + +Matching is case-sensitive and empty filter values are auto-removed. ## Functions diff --git a/docs/reference/index/namespaces/filterFn_greaterThan/functions/resolveFilterValue.md b/docs/reference/index/namespaces/filterFn_greaterThan/functions/resolveFilterValue.md index e54f30b5cc..20f8485a8a 100644 --- a/docs/reference/index/namespaces/filterFn_greaterThan/functions/resolveFilterValue.md +++ b/docs/reference/index/namespaces/filterFn_greaterThan/functions/resolveFilterValue.md @@ -9,7 +9,7 @@ title: resolveFilterValue function resolveFilterValue(val): boolean; ``` -Defined in: [fns/filterFns.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L144) +Defined in: [fns/filterFns.ts:162](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L162) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_greaterThan/index.md b/docs/reference/index/namespaces/filterFn_greaterThan/index.md index 12ec8a7afa..27952693aa 100644 --- a/docs/reference/index/namespaces/filterFn_greaterThan/index.md +++ b/docs/reference/index/namespaces/filterFn_greaterThan/index.md @@ -5,7 +5,10 @@ title: filterFn_greaterThan # filterFn\_greaterThan -Filter function for checking if a number is greater than a given number. +Keeps rows whose value is greater than the filter value. + +Numeric values are compared numerically when both sides can be coerced to +numbers; otherwise normalized strings are compared. ## Functions diff --git a/docs/reference/index/namespaces/filterFn_greaterThanOrEqualTo/functions/resolveFilterValue.md b/docs/reference/index/namespaces/filterFn_greaterThanOrEqualTo/functions/resolveFilterValue.md index 26c4350672..663dc242be 100644 --- a/docs/reference/index/namespaces/filterFn_greaterThanOrEqualTo/functions/resolveFilterValue.md +++ b/docs/reference/index/namespaces/filterFn_greaterThanOrEqualTo/functions/resolveFilterValue.md @@ -9,7 +9,7 @@ title: resolveFilterValue function resolveFilterValue(val): boolean; ``` -Defined in: [fns/filterFns.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L163) +Defined in: [fns/filterFns.ts:183](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L183) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_greaterThanOrEqualTo/index.md b/docs/reference/index/namespaces/filterFn_greaterThanOrEqualTo/index.md index 333b43fbda..baedbe45d3 100644 --- a/docs/reference/index/namespaces/filterFn_greaterThanOrEqualTo/index.md +++ b/docs/reference/index/namespaces/filterFn_greaterThanOrEqualTo/index.md @@ -5,7 +5,9 @@ title: filterFn_greaterThanOrEqualTo # filterFn\_greaterThanOrEqualTo -Filter function for checking if a number is greater than or equal to a given number. +Keeps rows whose value is greater than or equal to the filter value. + +Delegates to the built-in greater-than and equality comparisons. ## Functions diff --git a/docs/reference/index/namespaces/filterFn_inNumberRange/functions/autoRemove.md b/docs/reference/index/namespaces/filterFn_inNumberRange/functions/autoRemove.md index 326e90605f..6f417972d4 100644 --- a/docs/reference/index/namespaces/filterFn_inNumberRange/functions/autoRemove.md +++ b/docs/reference/index/namespaces/filterFn_inNumberRange/functions/autoRemove.md @@ -9,7 +9,7 @@ title: autoRemove function autoRemove(val): boolean; ``` -Defined in: [fns/filterFns.ts:279](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L279) +Defined in: [fns/filterFns.ts:310](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L310) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_inNumberRange/functions/resolveFilterValue.md b/docs/reference/index/namespaces/filterFn_inNumberRange/functions/resolveFilterValue.md index 24e9ffb513..eec1ce38a9 100644 --- a/docs/reference/index/namespaces/filterFn_inNumberRange/functions/resolveFilterValue.md +++ b/docs/reference/index/namespaces/filterFn_inNumberRange/functions/resolveFilterValue.md @@ -9,7 +9,7 @@ title: resolveFilterValue function resolveFilterValue(val): readonly [number, number]; ``` -Defined in: [fns/filterFns.ts:258](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L258) +Defined in: [fns/filterFns.ts:289](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L289) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_inNumberRange/index.md b/docs/reference/index/namespaces/filterFn_inNumberRange/index.md index 0336d66395..e9931477b3 100644 --- a/docs/reference/index/namespaces/filterFn_inNumberRange/index.md +++ b/docs/reference/index/namespaces/filterFn_inNumberRange/index.md @@ -5,7 +5,10 @@ title: filterFn_inNumberRange # filterFn\_inNumberRange -Filter function for checking if a number is within a given range. +Keeps rows whose numeric value is inside an inclusive `[min, max]` range. + +Filter values are normalized so blank endpoints become open-ended and +reversed endpoints are swapped. ## Functions diff --git a/docs/reference/index/namespaces/filterFn_includesString/functions/autoRemove.md b/docs/reference/index/namespaces/filterFn_includesString/functions/autoRemove.md index 40bcbd6dd1..f33b2beab3 100644 --- a/docs/reference/index/namespaces/filterFn_includesString/functions/autoRemove.md +++ b/docs/reference/index/namespaces/filterFn_includesString/functions/autoRemove.md @@ -9,7 +9,7 @@ title: autoRemove function autoRemove(val): boolean; ``` -Defined in: [fns/filterFns.ts:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L80) +Defined in: [fns/filterFns.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L90) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_includesString/index.md b/docs/reference/index/namespaces/filterFn_includesString/index.md index 04612a30bb..dc0a6524a9 100644 --- a/docs/reference/index/namespaces/filterFn_includesString/index.md +++ b/docs/reference/index/namespaces/filterFn_includesString/index.md @@ -5,7 +5,10 @@ title: filterFn_includesString # filterFn\_includesString -Filter function for checking if a string includes a given substring. (Non-case-sensitive) +Keeps rows whose stringified column value includes the filter text. + +Both values are lowercased before comparison, and empty filter values are +auto-removed. ## Functions diff --git a/docs/reference/index/namespaces/filterFn_includesStringSensitive/functions/autoRemove.md b/docs/reference/index/namespaces/filterFn_includesStringSensitive/functions/autoRemove.md index 2a3cce59e9..4928fe0fec 100644 --- a/docs/reference/index/namespaces/filterFn_includesStringSensitive/functions/autoRemove.md +++ b/docs/reference/index/namespaces/filterFn_includesStringSensitive/functions/autoRemove.md @@ -9,7 +9,7 @@ title: autoRemove function autoRemove(val): boolean; ``` -Defined in: [fns/filterFns.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L58) +Defined in: [fns/filterFns.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L65) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_includesStringSensitive/index.md b/docs/reference/index/namespaces/filterFn_includesStringSensitive/index.md index 93c0e855a3..faf0b836a1 100644 --- a/docs/reference/index/namespaces/filterFn_includesStringSensitive/index.md +++ b/docs/reference/index/namespaces/filterFn_includesStringSensitive/index.md @@ -5,7 +5,9 @@ title: filterFn_includesStringSensitive # filterFn\_includesStringSensitive -Filter function for checking if a string includes a given substring. (Case-sensitive) +Keeps rows whose stringified column value includes the filter text. + +Matching is case-sensitive and empty filter values are auto-removed. ## Functions diff --git a/docs/reference/index/namespaces/filterFn_lessThan/functions/resolveFilterValue.md b/docs/reference/index/namespaces/filterFn_lessThan/functions/resolveFilterValue.md index d06754949d..322022a5c6 100644 --- a/docs/reference/index/namespaces/filterFn_lessThan/functions/resolveFilterValue.md +++ b/docs/reference/index/namespaces/filterFn_lessThan/functions/resolveFilterValue.md @@ -9,7 +9,7 @@ title: resolveFilterValue function resolveFilterValue(val): boolean; ``` -Defined in: [fns/filterFns.ts:179](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L179) +Defined in: [fns/filterFns.ts:201](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L201) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_lessThan/index.md b/docs/reference/index/namespaces/filterFn_lessThan/index.md index 764110d19a..5e97188523 100644 --- a/docs/reference/index/namespaces/filterFn_lessThan/index.md +++ b/docs/reference/index/namespaces/filterFn_lessThan/index.md @@ -5,7 +5,9 @@ title: filterFn_lessThan # filterFn\_lessThan -Filter function for checking if a number is less than a given number. +Keeps rows whose value is less than the filter value. + +This is implemented as the inverse of greater-than-or-equal comparison. ## Functions diff --git a/docs/reference/index/namespaces/filterFn_lessThanOrEqualTo/functions/resolveFilterValue.md b/docs/reference/index/namespaces/filterFn_lessThanOrEqualTo/functions/resolveFilterValue.md index c603b9a79a..0d19286d21 100644 --- a/docs/reference/index/namespaces/filterFn_lessThanOrEqualTo/functions/resolveFilterValue.md +++ b/docs/reference/index/namespaces/filterFn_lessThanOrEqualTo/functions/resolveFilterValue.md @@ -9,7 +9,7 @@ title: resolveFilterValue function resolveFilterValue(val): boolean; ``` -Defined in: [fns/filterFns.ts:195](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L195) +Defined in: [fns/filterFns.ts:219](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L219) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_lessThanOrEqualTo/index.md b/docs/reference/index/namespaces/filterFn_lessThanOrEqualTo/index.md index ffa6e3e500..136109cf18 100644 --- a/docs/reference/index/namespaces/filterFn_lessThanOrEqualTo/index.md +++ b/docs/reference/index/namespaces/filterFn_lessThanOrEqualTo/index.md @@ -5,7 +5,9 @@ title: filterFn_lessThanOrEqualTo # filterFn\_lessThanOrEqualTo -Filter function for checking if a number is less than or equal to a given number. +Keeps rows whose value is less than or equal to the filter value. + +This is implemented as the inverse of greater-than comparison. ## Functions diff --git a/docs/reference/index/namespaces/filterFn_weakEquals/functions/autoRemove.md b/docs/reference/index/namespaces/filterFn_weakEquals/functions/autoRemove.md index dfd81b6bc8..699748221e 100644 --- a/docs/reference/index/namespaces/filterFn_weakEquals/functions/autoRemove.md +++ b/docs/reference/index/namespaces/filterFn_weakEquals/functions/autoRemove.md @@ -9,7 +9,7 @@ title: autoRemove function autoRemove(val): boolean; ``` -Defined in: [fns/filterFns.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L38) +Defined in: [fns/filterFns.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L43) ## Parameters diff --git a/docs/reference/index/namespaces/filterFn_weakEquals/index.md b/docs/reference/index/namespaces/filterFn_weakEquals/index.md index 658aea77bf..2c31596217 100644 --- a/docs/reference/index/namespaces/filterFn_weakEquals/index.md +++ b/docs/reference/index/namespaces/filterFn_weakEquals/index.md @@ -5,7 +5,10 @@ title: filterFn_weakEquals # filterFn\_weakEquals -Filter function for checking if a value is weakly equal to a given value. (JS == comparison) +Keeps rows whose column value is loosely equal to the filter value. + +Uses JavaScript `==` comparison and auto-removes empty filter values. This is +useful for matching string input against numeric row values. ## Functions diff --git a/docs/reference/index/type-aliases/AccessorColumnDef.md b/docs/reference/index/type-aliases/AccessorColumnDef.md index 2aef75707b..cc929db29b 100644 --- a/docs/reference/index/type-aliases/AccessorColumnDef.md +++ b/docs/reference/index/type-aliases/AccessorColumnDef.md @@ -11,7 +11,7 @@ type AccessorColumnDef = | AccessorFnColumnDef; ``` -Defined in: [types/ColumnDef.ts:194](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L194) +Defined in: [types/ColumnDef.ts:232](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L232) ## Type Parameters diff --git a/docs/reference/index/type-aliases/AccessorFn.md b/docs/reference/index/type-aliases/AccessorFn.md index c66ac0af96..0999bace05 100644 --- a/docs/reference/index/type-aliases/AccessorFn.md +++ b/docs/reference/index/type-aliases/AccessorFn.md @@ -9,7 +9,12 @@ title: AccessorFn type AccessorFn = (originalRow, index) => TValue; ``` -Defined in: [types/ColumnDef.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L30) +Defined in: [types/ColumnDef.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L36) + +Reads a cell value from an original row object. + +The row index is provided for accessors that need stable position-aware +derived values. ## Type Parameters diff --git a/docs/reference/index/type-aliases/AccessorFnColumnDef.md b/docs/reference/index/type-aliases/AccessorFnColumnDef.md index bb77da4e78..a709444c94 100644 --- a/docs/reference/index/type-aliases/AccessorFnColumnDef.md +++ b/docs/reference/index/type-aliases/AccessorFnColumnDef.md @@ -9,7 +9,7 @@ title: AccessorFnColumnDef type AccessorFnColumnDef = AccessorFnColumnDefBase & ColumnIdentifiers; ``` -Defined in: [types/ColumnDef.ts:171](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L171) +Defined in: [types/ColumnDef.ts:209](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L209) ## Type Parameters diff --git a/docs/reference/index/type-aliases/AccessorFnColumnDefBase.md b/docs/reference/index/type-aliases/AccessorFnColumnDefBase.md index 0949ba3710..8d33754ce5 100644 --- a/docs/reference/index/type-aliases/AccessorFnColumnDefBase.md +++ b/docs/reference/index/type-aliases/AccessorFnColumnDefBase.md @@ -9,7 +9,7 @@ title: AccessorFnColumnDefBase type AccessorFnColumnDefBase = ColumnDefBase & object; ``` -Defined in: [types/ColumnDef.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L163) +Defined in: [types/ColumnDef.ts:201](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L201) ## Type Declaration diff --git a/docs/reference/index/type-aliases/AccessorKeyColumnDef.md b/docs/reference/index/type-aliases/AccessorKeyColumnDef.md index c60f4368cd..09ecca041d 100644 --- a/docs/reference/index/type-aliases/AccessorKeyColumnDef.md +++ b/docs/reference/index/type-aliases/AccessorKeyColumnDef.md @@ -9,7 +9,7 @@ title: AccessorKeyColumnDef type AccessorKeyColumnDef = AccessorKeyColumnDefBase & Partial>; ``` -Defined in: [types/ColumnDef.ts:187](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L187) +Defined in: [types/ColumnDef.ts:225](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L225) ## Type Parameters diff --git a/docs/reference/index/type-aliases/AccessorKeyColumnDefBase.md b/docs/reference/index/type-aliases/AccessorKeyColumnDefBase.md index 8a180c439f..753ebe482a 100644 --- a/docs/reference/index/type-aliases/AccessorKeyColumnDefBase.md +++ b/docs/reference/index/type-aliases/AccessorKeyColumnDefBase.md @@ -9,7 +9,7 @@ title: AccessorKeyColumnDefBase type AccessorKeyColumnDefBase = ColumnDefBase & object; ``` -Defined in: [types/ColumnDef.ts:178](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L178) +Defined in: [types/ColumnDef.ts:216](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L216) ## Type Declaration diff --git a/docs/reference/index/type-aliases/BuiltInAggregationFn.md b/docs/reference/index/type-aliases/BuiltInAggregationFn.md index e7211de73c..9cac40ea13 100644 --- a/docs/reference/index/type-aliases/BuiltInAggregationFn.md +++ b/docs/reference/index/type-aliases/BuiltInAggregationFn.md @@ -9,4 +9,4 @@ title: BuiltInAggregationFn type BuiltInAggregationFn = keyof typeof aggregationFns; ``` -Defined in: [fns/aggregationFns.ts:237](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L237) +Defined in: [fns/aggregationFns.ts:261](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L261) diff --git a/docs/reference/index/type-aliases/BuiltInFilterFn.md b/docs/reference/index/type-aliases/BuiltInFilterFn.md index d11b3a6c28..6bc6ab09e5 100644 --- a/docs/reference/index/type-aliases/BuiltInFilterFn.md +++ b/docs/reference/index/type-aliases/BuiltInFilterFn.md @@ -9,4 +9,4 @@ title: BuiltInFilterFn type BuiltInFilterFn = keyof typeof filterFns; ``` -Defined in: [fns/filterFns.ts:378](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L378) +Defined in: [fns/filterFns.ts:409](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L409) diff --git a/docs/reference/index/type-aliases/ColumnDef.md b/docs/reference/index/type-aliases/ColumnDef.md index 3afd463a1c..af7d86dfdb 100644 --- a/docs/reference/index/type-aliases/ColumnDef.md +++ b/docs/reference/index/type-aliases/ColumnDef.md @@ -12,7 +12,7 @@ type ColumnDef = | AccessorColumnDef; ``` -Defined in: [types/ColumnDef.ts:202](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L202) +Defined in: [types/ColumnDef.ts:240](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L240) ## Type Parameters diff --git a/docs/reference/index/type-aliases/ColumnDefBase.md b/docs/reference/index/type-aliases/ColumnDefBase.md index 1c291b5ff8..4e51bfd1ff 100644 --- a/docs/reference/index/type-aliases/ColumnDefBase.md +++ b/docs/reference/index/type-aliases/ColumnDefBase.md @@ -17,7 +17,7 @@ type ColumnDefBase = ColumnDefBase_Core & ExtractFeatureTypes<"ColumnDef", TFeatures> & ColumnDef_Plugins; ``` -Defined in: [types/ColumnDef.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L75) +Defined in: [types/ColumnDef.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L113) ## Type Parameters diff --git a/docs/reference/index/type-aliases/ColumnDefBase_All.md b/docs/reference/index/type-aliases/ColumnDefBase_All.md index b1428ac707..13a372b379 100644 --- a/docs/reference/index/type-aliases/ColumnDefBase_All.md +++ b/docs/reference/index/type-aliases/ColumnDefBase_All.md @@ -9,7 +9,7 @@ title: ColumnDefBase_All type ColumnDefBase_All = ColumnDefBase_Core & Partial & ColumnDef_GlobalFiltering & ColumnDef_RowSorting & ColumnDef_ColumnGrouping & ColumnDef_ColumnSizing & ColumnDef_ColumnResizing>; ``` -Defined in: [types/ColumnDef.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L117) +Defined in: [types/ColumnDef.ts:155](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L155) ## Type Parameters diff --git a/docs/reference/index/type-aliases/ColumnDefResolved.md b/docs/reference/index/type-aliases/ColumnDefResolved.md index f475f890a7..caf4cff9e6 100644 --- a/docs/reference/index/type-aliases/ColumnDefResolved.md +++ b/docs/reference/index/type-aliases/ColumnDefResolved.md @@ -9,7 +9,7 @@ title: ColumnDefResolved type ColumnDefResolved = Partial>> & object; ``` -Defined in: [types/ColumnDef.ts:211](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L211) +Defined in: [types/ColumnDef.ts:249](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L249) ## Type Declaration diff --git a/docs/reference/index/type-aliases/ColumnDefTemplate.md b/docs/reference/index/type-aliases/ColumnDefTemplate.md index 2f3f105ce0..edb25fee23 100644 --- a/docs/reference/index/type-aliases/ColumnDefTemplate.md +++ b/docs/reference/index/type-aliases/ColumnDefTemplate.md @@ -9,7 +9,12 @@ title: ColumnDefTemplate type ColumnDefTemplate = string | (props) => any; ``` -Defined in: [types/ColumnDef.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L35) +Defined in: [types/ColumnDef.ts:47](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L47) + +A renderable column template value. + +Strings render directly; functions receive the relevant cell/header context +and can return framework-specific render output. ## Type Parameters diff --git a/docs/reference/index/type-aliases/DebugOptions.md b/docs/reference/index/type-aliases/DebugOptions.md index 24f4b37697..a19f5e85c5 100644 --- a/docs/reference/index/type-aliases/DebugOptions.md +++ b/docs/reference/index/type-aliases/DebugOptions.md @@ -9,7 +9,7 @@ title: DebugOptions type DebugOptions = object & DebugKeysFor; ``` -Defined in: [types/TableOptions.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L41) +Defined in: [types/TableOptions.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L45) ## Type Declaration diff --git a/docs/reference/index/type-aliases/DisplayColumnDef.md b/docs/reference/index/type-aliases/DisplayColumnDef.md index ace9c7ea70..304f696e82 100644 --- a/docs/reference/index/type-aliases/DisplayColumnDef.md +++ b/docs/reference/index/type-aliases/DisplayColumnDef.md @@ -9,7 +9,7 @@ title: DisplayColumnDef type DisplayColumnDef = ColumnDefBase & ColumnIdentifiers; ``` -Defined in: [types/ColumnDef.ts:142](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L142) +Defined in: [types/ColumnDef.ts:180](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L180) ## Type Parameters diff --git a/docs/reference/index/type-aliases/GroupColumnDef.md b/docs/reference/index/type-aliases/GroupColumnDef.md index 2a6a72d73f..8965e42e06 100644 --- a/docs/reference/index/type-aliases/GroupColumnDef.md +++ b/docs/reference/index/type-aliases/GroupColumnDef.md @@ -9,7 +9,7 @@ title: GroupColumnDef type GroupColumnDef = GroupColumnDefBase & ColumnIdentifiers; ``` -Defined in: [types/ColumnDef.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L156) +Defined in: [types/ColumnDef.ts:194](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L194) ## Type Parameters diff --git a/docs/reference/index/type-aliases/GroupingColumnMode.md b/docs/reference/index/type-aliases/GroupingColumnMode.md index 3855a3ba04..afc8313da1 100644 --- a/docs/reference/index/type-aliases/GroupingColumnMode.md +++ b/docs/reference/index/type-aliases/GroupingColumnMode.md @@ -9,4 +9,4 @@ title: GroupingColumnMode type GroupingColumnMode = false | "reorder" | "remove"; ``` -Defined in: [features/column-grouping/columnGroupingFeature.types.ts:173](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L173) +Defined in: [features/column-grouping/columnGroupingFeature.types.ts:175](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts#L175) diff --git a/docs/reference/index/type-aliases/IdentifiedColumnDef.md b/docs/reference/index/type-aliases/IdentifiedColumnDef.md index 2dcfeafae5..107856038c 100644 --- a/docs/reference/index/type-aliases/IdentifiedColumnDef.md +++ b/docs/reference/index/type-aliases/IdentifiedColumnDef.md @@ -9,7 +9,7 @@ title: IdentifiedColumnDef type IdentifiedColumnDef = ColumnDefBase & object; ``` -Defined in: [types/ColumnDef.ts:133](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L133) +Defined in: [types/ColumnDef.ts:171](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L171) ## Type Declaration diff --git a/docs/reference/index/type-aliases/StringOrTemplateHeader.md b/docs/reference/index/type-aliases/StringOrTemplateHeader.md index b63735544b..3015ddf88b 100644 --- a/docs/reference/index/type-aliases/StringOrTemplateHeader.md +++ b/docs/reference/index/type-aliases/StringOrTemplateHeader.md @@ -11,7 +11,7 @@ type StringOrTemplateHeader = | ColumnDefTemplate>; ``` -Defined in: [types/ColumnDef.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L39) +Defined in: [types/ColumnDef.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/ColumnDef.ts#L51) ## Type Parameters diff --git a/docs/reference/index/type-aliases/TableOptions.md b/docs/reference/index/type-aliases/TableOptions.md index fc7f03a758..df0458dbbe 100644 --- a/docs/reference/index/type-aliases/TableOptions.md +++ b/docs/reference/index/type-aliases/TableOptions.md @@ -22,7 +22,13 @@ type TableOptions = TableOptions_Core & Unio | "rowSortingFeature" extends keyof TFeatures ? TableOptions_RowSorting : never> & ExtractFeatureTypes<"TableOptions", TFeatures> & TableOptions_Plugins & DebugOptions; ``` -Defined in: [types/TableOptions.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L51) +Defined in: [types/TableOptions.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L62) + +Complete table options for a specific feature set. + +Feature options are included only when their feature is present in +`TFeatures`, then custom feature/plugin options and debug options are mixed +in. ## Type Parameters diff --git a/docs/reference/index/type-aliases/TableOptions_All.md b/docs/reference/index/type-aliases/TableOptions_All.md index e05e46d917..6e1122f183 100644 --- a/docs/reference/index/type-aliases/TableOptions_All.md +++ b/docs/reference/index/type-aliases/TableOptions_All.md @@ -9,7 +9,10 @@ title: TableOptions_All type TableOptions_All = TableOptions_Core & Partial & TableOptions_ColumnGrouping & TableOptions_ColumnOrdering & TableOptions_ColumnPinning & TableOptions_ColumnResizing & TableOptions_ColumnSizing & TableOptions_ColumnVisibility & TableOptions_GlobalFiltering & TableOptions_RowExpanding & TableOptions_RowPagination & TableOptions_RowPinning & TableOptions_RowSelection & TableOptions_RowSorting>; ``` -Defined in: [types/TableOptions.ts:107](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L107) +Defined in: [types/TableOptions.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableOptions.ts#L122) + +Internal broad option shape used where feature code may need to read options +from features that are not present in the current generic feature set. ## Type Parameters diff --git a/docs/reference/index/type-aliases/TableState.md b/docs/reference/index/type-aliases/TableState.md index c8b8d8fdc2..947278193d 100644 --- a/docs/reference/index/type-aliases/TableState.md +++ b/docs/reference/index/type-aliases/TableState.md @@ -22,7 +22,12 @@ type TableState = UnionToIntersection< | "rowSortingFeature" extends keyof TFeatures ? TableState_RowSorting : never> & ExtractFeatureTypes<"TableState", TFeatures> & TableState_Plugins; ``` -Defined in: [types/TableState.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableState.ts#L23) +Defined in: [types/TableState.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableState.ts#L29) + +Complete table state for a specific feature set. + +State slices are included only when their feature is present in `TFeatures`, +then custom feature/plugin state is mixed in. ## Type Parameters diff --git a/docs/reference/index/type-aliases/TableState_All.md b/docs/reference/index/type-aliases/TableState_All.md index 4062716898..9a377b1c95 100644 --- a/docs/reference/index/type-aliases/TableState_All.md +++ b/docs/reference/index/type-aliases/TableState_All.md @@ -9,4 +9,9 @@ title: TableState_All type TableState_All = Partial; ``` -Defined in: [types/TableState.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableState.ts#L74) +Defined in: [types/TableState.ts:86](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/TableState.ts#L86) + +Internal broad state shape containing every stock feature state slice. + +Feature internals use this when they may need to inspect optional slices owned +by other features. diff --git a/docs/reference/index/variables/aggregationFn_count.md b/docs/reference/index/variables/aggregationFn_count.md index c0235a22f7..ed7857f832 100644 --- a/docs/reference/index/variables/aggregationFn_count.md +++ b/docs/reference/index/variables/aggregationFn_count.md @@ -9,6 +9,8 @@ title: aggregationFn_count const aggregationFn_count: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:210](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L210) +Defined in: [fns/aggregationFns.ts:234](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L234) -Aggregation function for counting the number of rows in a column. +Counts the number of leaf rows in the group. + +The column id is ignored because the result is based only on group size. diff --git a/docs/reference/index/variables/aggregationFn_extent.md b/docs/reference/index/variables/aggregationFn_extent.md index fcbd9ceca0..38716cf2e4 100644 --- a/docs/reference/index/variables/aggregationFn_extent.md +++ b/docs/reference/index/variables/aggregationFn_extent.md @@ -9,6 +9,9 @@ title: aggregationFn_extent const aggregationFn_extent: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:83](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L83) +Defined in: [fns/aggregationFns.ts:95](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L95) -Aggregation function for finding the extent (min and max) of a column. +Finds the numeric extent for a grouped column. + +Returns `[min, max]`, where each entry is `undefined` when no numeric value is +present. diff --git a/docs/reference/index/variables/aggregationFn_max.md b/docs/reference/index/variables/aggregationFn_max.md index 9b85faaab4..32e7c834fd 100644 --- a/docs/reference/index/variables/aggregationFn_max.md +++ b/docs/reference/index/variables/aggregationFn_max.md @@ -9,6 +9,9 @@ title: aggregationFn_max const aggregationFn_max: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L56) +Defined in: [fns/aggregationFns.ts:65](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L65) -Aggregation function for finding the maximum value of a column. +Finds the maximum numeric child-row value for a grouped column. + +Nullish and non-number values are ignored. Returns `undefined` when no +numeric value is found. diff --git a/docs/reference/index/variables/aggregationFn_mean.md b/docs/reference/index/variables/aggregationFn_mean.md index 19c49f6a68..23616f322e 100644 --- a/docs/reference/index/variables/aggregationFn_mean.md +++ b/docs/reference/index/variables/aggregationFn_mean.md @@ -9,6 +9,9 @@ title: aggregationFn_mean const aggregationFn_mean: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L112) +Defined in: [fns/aggregationFns.ts:127](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L127) -Aggregation function for finding the mean (average) of a column. +Averages numeric leaf-row values for a grouped column. + +Number-like values are coerced with unary `+`; nullish and non-numeric values +are ignored. diff --git a/docs/reference/index/variables/aggregationFn_median.md b/docs/reference/index/variables/aggregationFn_median.md index fe6fcf947a..296257d20a 100644 --- a/docs/reference/index/variables/aggregationFn_median.md +++ b/docs/reference/index/variables/aggregationFn_median.md @@ -9,6 +9,9 @@ title: aggregationFn_median const aggregationFn_median: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L144) +Defined in: [fns/aggregationFns.ts:162](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L162) -Aggregation function for finding the median value of a column. +Computes the median of numeric leaf-row values for a grouped column. + +All values must be numbers. If any value is non-numeric, or no leaf rows are +present, the result is `undefined`. diff --git a/docs/reference/index/variables/aggregationFn_min.md b/docs/reference/index/variables/aggregationFn_min.md index c5c893c5a9..f05fb32e71 100644 --- a/docs/reference/index/variables/aggregationFn_min.md +++ b/docs/reference/index/variables/aggregationFn_min.md @@ -9,6 +9,9 @@ title: aggregationFn_min const aggregationFn_min: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L28) +Defined in: [fns/aggregationFns.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L34) -Aggregation function for finding the minimum value of a column. +Finds the minimum numeric child-row value for a grouped column. + +Nullish and non-number values are ignored. Returns `undefined` when no +numeric value is found. diff --git a/docs/reference/index/variables/aggregationFn_sum.md b/docs/reference/index/variables/aggregationFn_sum.md index 93c85c1a2d..bc3128e723 100644 --- a/docs/reference/index/variables/aggregationFn_sum.md +++ b/docs/reference/index/variables/aggregationFn_sum.md @@ -9,6 +9,9 @@ title: aggregationFn_sum const aggregationFn_sum: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L9) +Defined in: [fns/aggregationFns.ts:12](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L12) -Aggregation function for summing up the values of a column. +Sums numeric child-row values for a grouped column. + +Non-number values contribute `0`. Child rows are used so nested group totals +can reuse already aggregated values. diff --git a/docs/reference/index/variables/aggregationFn_unique.md b/docs/reference/index/variables/aggregationFn_unique.md index d7933949d1..d1442e30be 100644 --- a/docs/reference/index/variables/aggregationFn_unique.md +++ b/docs/reference/index/variables/aggregationFn_unique.md @@ -9,6 +9,8 @@ title: aggregationFn_unique const aggregationFn_unique: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:176](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L176) +Defined in: [fns/aggregationFns.ts:196](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L196) -Aggregation function for finding the unique values of a column. +Collects unique leaf-row values for a grouped column. + +Values are compared with JavaScript `Set` semantics. diff --git a/docs/reference/index/variables/aggregationFn_uniqueCount.md b/docs/reference/index/variables/aggregationFn_uniqueCount.md index bafb8fb233..f76a0d4d1f 100644 --- a/docs/reference/index/variables/aggregationFn_uniqueCount.md +++ b/docs/reference/index/variables/aggregationFn_uniqueCount.md @@ -9,6 +9,8 @@ title: aggregationFn_uniqueCount const aggregationFn_uniqueCount: AggregationFn; ``` -Defined in: [fns/aggregationFns.ts:193](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L193) +Defined in: [fns/aggregationFns.ts:215](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L215) -Aggregation function for finding the count of unique values of a column. +Counts unique leaf-row values for a grouped column. + +Values are compared with JavaScript `Set` semantics. diff --git a/docs/reference/index/variables/aggregationFns.md b/docs/reference/index/variables/aggregationFns.md index 015004e72e..00692ebc2a 100644 --- a/docs/reference/index/variables/aggregationFns.md +++ b/docs/reference/index/variables/aggregationFns.md @@ -9,7 +9,7 @@ title: aggregationFns const aggregationFns: object; ``` -Defined in: [fns/aggregationFns.ts:225](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L225) +Defined in: [fns/aggregationFns.ts:249](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/aggregationFns.ts#L249) The built-in aggregation function registry. diff --git a/docs/reference/index/variables/filterFn_arrHas.md b/docs/reference/index/variables/filterFn_arrHas.md index 09c7f6330e..5d0e408baf 100644 --- a/docs/reference/index/variables/filterFn_arrHas.md +++ b/docs/reference/index/variables/filterFn_arrHas.md @@ -9,6 +9,6 @@ title: filterFn_arrHas const filterFn_arrHas: FilterFn; ``` -Defined in: [fns/filterFns.ts:287](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L287) +Defined in: [fns/filterFns.ts:318](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L318) -Filter function for checking if an array has a given value. +Keeps rows whose scalar column value equals at least one filter value. diff --git a/docs/reference/index/variables/filterFn_arrIncludes.md b/docs/reference/index/variables/filterFn_arrIncludes.md index 7ef63136e6..7354efcbba 100644 --- a/docs/reference/index/variables/filterFn_arrIncludes.md +++ b/docs/reference/index/variables/filterFn_arrIncludes.md @@ -9,6 +9,6 @@ title: filterFn_arrIncludes const filterFn_arrIncludes: FilterFn; ``` -Defined in: [fns/filterFns.ts:301](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L301) +Defined in: [fns/filterFns.ts:332](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L332) -Filter function for checking if an array includes a given value. +Keeps rows whose array or string column value includes at least one filter value. diff --git a/docs/reference/index/variables/filterFn_arrIncludesAll.md b/docs/reference/index/variables/filterFn_arrIncludesAll.md index ba14ab386c..ebddd5884d 100644 --- a/docs/reference/index/variables/filterFn_arrIncludesAll.md +++ b/docs/reference/index/variables/filterFn_arrIncludesAll.md @@ -9,6 +9,6 @@ title: filterFn_arrIncludesAll const filterFn_arrIncludesAll: FilterFn; ``` -Defined in: [fns/filterFns.ts:321](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L321) +Defined in: [fns/filterFns.ts:352](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L352) -Filter function for checking if an array includes all of the given values. +Keeps rows whose array column value includes every filter value. diff --git a/docs/reference/index/variables/filterFn_arrIncludesSome.md b/docs/reference/index/variables/filterFn_arrIncludesSome.md index 3f583c3da2..07ffa2fefc 100644 --- a/docs/reference/index/variables/filterFn_arrIncludesSome.md +++ b/docs/reference/index/variables/filterFn_arrIncludesSome.md @@ -9,6 +9,6 @@ title: filterFn_arrIncludesSome const filterFn_arrIncludesSome: FilterFn; ``` -Defined in: [fns/filterFns.ts:340](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L340) +Defined in: [fns/filterFns.ts:371](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L371) -Filter function for checking if an array includes any of the given values. +Keeps rows whose array column value includes at least one filter value. diff --git a/docs/reference/index/variables/filterFn_equals.md b/docs/reference/index/variables/filterFn_equals.md index ff3f1adaf8..640b1e0e8e 100644 --- a/docs/reference/index/variables/filterFn_equals.md +++ b/docs/reference/index/variables/filterFn_equals.md @@ -9,6 +9,8 @@ title: filterFn_equals const filterFn_equals: FilterFn; ``` -Defined in: [fns/filterFns.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L11) +Defined in: [fns/filterFns.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L13) -Filter function for checking if a value is exactly equal to a given value. (JS === comparison) +Keeps rows whose column value is strictly equal to the filter value. + +Uses JavaScript `===` comparison and auto-removes empty filter values. diff --git a/docs/reference/index/variables/filterFn_equalsString.md b/docs/reference/index/variables/filterFn_equalsString.md index f7feb8f0ce..298c800c01 100644 --- a/docs/reference/index/variables/filterFn_equalsString.md +++ b/docs/reference/index/variables/filterFn_equalsString.md @@ -9,6 +9,9 @@ title: filterFn_equalsString const filterFn_equalsString: FilterFn; ``` -Defined in: [fns/filterFns.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L85) +Defined in: [fns/filterFns.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L98) -Filter function for checking if a string is exactly equal to a given string. (Non-case-sensitive) +Keeps rows whose stringified column value equals the filter text. + +Both values are lowercased before comparison, and empty filter values are +auto-removed. diff --git a/docs/reference/index/variables/filterFn_equalsStringSensitive.md b/docs/reference/index/variables/filterFn_equalsStringSensitive.md index 2dd960758c..11d07923e2 100644 --- a/docs/reference/index/variables/filterFn_equalsStringSensitive.md +++ b/docs/reference/index/variables/filterFn_equalsStringSensitive.md @@ -9,6 +9,8 @@ title: filterFn_equalsStringSensitive const filterFn_equalsStringSensitive: FilterFn; ``` -Defined in: [fns/filterFns.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L104) +Defined in: [fns/filterFns.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L119) -Filter function for checking if a string is exactly equal to a given string. (Case-sensitive) +Keeps rows whose stringified column value exactly equals the filter text. + +Matching is case-sensitive and empty filter values are auto-removed. diff --git a/docs/reference/index/variables/filterFn_greaterThan.md b/docs/reference/index/variables/filterFn_greaterThan.md index c1a86a2c1d..06708c6dd0 100644 --- a/docs/reference/index/variables/filterFn_greaterThan.md +++ b/docs/reference/index/variables/filterFn_greaterThan.md @@ -9,6 +9,9 @@ title: filterFn_greaterThan const filterFn_greaterThan: FilterFn; ``` -Defined in: [fns/filterFns.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L122) +Defined in: [fns/filterFns.ts:140](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L140) -Filter function for checking if a number is greater than a given number. +Keeps rows whose value is greater than the filter value. + +Numeric values are compared numerically when both sides can be coerced to +numbers; otherwise normalized strings are compared. diff --git a/docs/reference/index/variables/filterFn_greaterThanOrEqualTo.md b/docs/reference/index/variables/filterFn_greaterThanOrEqualTo.md index 513c1e07cc..9e76c5b705 100644 --- a/docs/reference/index/variables/filterFn_greaterThanOrEqualTo.md +++ b/docs/reference/index/variables/filterFn_greaterThanOrEqualTo.md @@ -9,6 +9,8 @@ title: filterFn_greaterThanOrEqualTo const filterFn_greaterThanOrEqualTo: FilterFn; ``` -Defined in: [fns/filterFns.ts:149](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L149) +Defined in: [fns/filterFns.ts:169](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L169) -Filter function for checking if a number is greater than or equal to a given number. +Keeps rows whose value is greater than or equal to the filter value. + +Delegates to the built-in greater-than and equality comparisons. diff --git a/docs/reference/index/variables/filterFn_inNumberRange.md b/docs/reference/index/variables/filterFn_inNumberRange.md index 363992954d..b51457a9c3 100644 --- a/docs/reference/index/variables/filterFn_inNumberRange.md +++ b/docs/reference/index/variables/filterFn_inNumberRange.md @@ -9,6 +9,9 @@ title: filterFn_inNumberRange const filterFn_inNumberRange: FilterFn; ``` -Defined in: [fns/filterFns.ts:244](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L244) +Defined in: [fns/filterFns.ts:275](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L275) -Filter function for checking if a number is within a given range. +Keeps rows whose numeric value is inside an inclusive `[min, max]` range. + +Filter values are normalized so blank endpoints become open-ended and +reversed endpoints are swapped. diff --git a/docs/reference/index/variables/filterFn_includesString.md b/docs/reference/index/variables/filterFn_includesString.md index ac378ce25d..9594ea3f47 100644 --- a/docs/reference/index/variables/filterFn_includesString.md +++ b/docs/reference/index/variables/filterFn_includesString.md @@ -9,6 +9,9 @@ title: filterFn_includesString const filterFn_includesString: FilterFn; ``` -Defined in: [fns/filterFns.ts:63](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L63) +Defined in: [fns/filterFns.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L73) -Filter function for checking if a string includes a given substring. (Non-case-sensitive) +Keeps rows whose stringified column value includes the filter text. + +Both values are lowercased before comparison, and empty filter values are +auto-removed. diff --git a/docs/reference/index/variables/filterFn_includesStringSensitive.md b/docs/reference/index/variables/filterFn_includesStringSensitive.md index 244397153f..0e879ad883 100644 --- a/docs/reference/index/variables/filterFn_includesStringSensitive.md +++ b/docs/reference/index/variables/filterFn_includesStringSensitive.md @@ -9,6 +9,8 @@ title: filterFn_includesStringSensitive const filterFn_includesStringSensitive: FilterFn; ``` -Defined in: [fns/filterFns.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L45) +Defined in: [fns/filterFns.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L52) -Filter function for checking if a string includes a given substring. (Case-sensitive) +Keeps rows whose stringified column value includes the filter text. + +Matching is case-sensitive and empty filter values are auto-removed. diff --git a/docs/reference/index/variables/filterFn_lessThan.md b/docs/reference/index/variables/filterFn_lessThan.md index 3917d74e60..0c76920d1e 100644 --- a/docs/reference/index/variables/filterFn_lessThan.md +++ b/docs/reference/index/variables/filterFn_lessThan.md @@ -9,6 +9,8 @@ title: filterFn_lessThan const filterFn_lessThan: FilterFn; ``` -Defined in: [fns/filterFns.ts:168](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L168) +Defined in: [fns/filterFns.ts:190](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L190) -Filter function for checking if a number is less than a given number. +Keeps rows whose value is less than the filter value. + +This is implemented as the inverse of greater-than-or-equal comparison. diff --git a/docs/reference/index/variables/filterFn_lessThanOrEqualTo.md b/docs/reference/index/variables/filterFn_lessThanOrEqualTo.md index 7febfe8575..8e9da30ebc 100644 --- a/docs/reference/index/variables/filterFn_lessThanOrEqualTo.md +++ b/docs/reference/index/variables/filterFn_lessThanOrEqualTo.md @@ -9,6 +9,8 @@ title: filterFn_lessThanOrEqualTo const filterFn_lessThanOrEqualTo: FilterFn; ``` -Defined in: [fns/filterFns.ts:184](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L184) +Defined in: [fns/filterFns.ts:208](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L208) -Filter function for checking if a number is less than or equal to a given number. +Keeps rows whose value is less than or equal to the filter value. + +This is implemented as the inverse of greater-than comparison. diff --git a/docs/reference/index/variables/filterFn_weakEquals.md b/docs/reference/index/variables/filterFn_weakEquals.md index 44c176be0a..6afed75e18 100644 --- a/docs/reference/index/variables/filterFn_weakEquals.md +++ b/docs/reference/index/variables/filterFn_weakEquals.md @@ -9,6 +9,9 @@ title: filterFn_weakEquals const filterFn_weakEquals: FilterFn; ``` -Defined in: [fns/filterFns.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L27) +Defined in: [fns/filterFns.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L32) -Filter function for checking if a value is weakly equal to a given value. (JS == comparison) +Keeps rows whose column value is loosely equal to the filter value. + +Uses JavaScript `==` comparison and auto-removes empty filter values. This is +useful for matching string input against numeric row values. diff --git a/docs/reference/index/variables/filterFns.md b/docs/reference/index/variables/filterFns.md index 6e78497eb6..ee4df3bf38 100644 --- a/docs/reference/index/variables/filterFns.md +++ b/docs/reference/index/variables/filterFns.md @@ -9,7 +9,7 @@ title: filterFns const filterFns: object; ``` -Defined in: [fns/filterFns.ts:363](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L363) +Defined in: [fns/filterFns.ts:394](https://github.com/TanStack/table/blob/main/packages/table-core/src/fns/filterFns.ts#L394) The built-in filter function registry. diff --git a/docs/reference/static-functions/functions/column_getIsSorted.md b/docs/reference/static-functions/functions/column_getIsSorted.md index d49e43e42b..094dc18d78 100644 --- a/docs/reference/static-functions/functions/column_getIsSorted.md +++ b/docs/reference/static-functions/functions/column_getIsSorted.md @@ -11,7 +11,7 @@ function column_getIsSorted(column): false | SortDirec Defined in: [features/row-sorting/rowSortingFeature.utils.ts:403](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L403) -Returns is sorted for a column. +Reads this column's current sort direction. The result is `false` when the column is not sorted, otherwise `'asc'` or `'desc'` based on the column's entry in `state.sorting`. diff --git a/docs/reference/static-functions/functions/getDefaultExpandedState.md b/docs/reference/static-functions/functions/getDefaultExpandedState.md index bd50db92ee..4cc98299d7 100644 --- a/docs/reference/static-functions/functions/getDefaultExpandedState.md +++ b/docs/reference/static-functions/functions/getDefaultExpandedState.md @@ -9,11 +9,12 @@ title: getDefaultExpandedState function getDefaultExpandedState(): ExpandedState; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L21) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L22) -Returns the default expanded state. +Creates the default expanded state. -Feature constructors use this value to initialize the table state or option defaults when no user value is provided. +The feature default is an empty map, meaning no rows are expanded. Reset APIs +use this value when `defaultState` is `true`. ## Returns @@ -22,5 +23,5 @@ Feature constructors use this value to initialize the table state or option defa ## Example ```ts -const initialValue = getDefaultExpandedState() +const expanded = getDefaultExpandedState() ``` diff --git a/docs/reference/static-functions/functions/getDefaultRowPinningState.md b/docs/reference/static-functions/functions/getDefaultRowPinningState.md index 77455d9759..36fbe53a0e 100644 --- a/docs/reference/static-functions/functions/getDefaultRowPinningState.md +++ b/docs/reference/static-functions/functions/getDefaultRowPinningState.md @@ -9,11 +9,12 @@ title: getDefaultRowPinningState function getDefaultRowPinningState(): RowPinningState; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L24) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:25](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L25) -Returns the default row pinning state. +Creates the default row pinning state. -Feature constructors use this value to initialize the table state or option defaults when no user value is provided. +Both pinning regions start empty. Reset APIs use this value when +`defaultState` is `true`. ## Returns @@ -22,5 +23,5 @@ Feature constructors use this value to initialize the table state or option defa ## Example ```ts -const initialValue = getDefaultRowPinningState() +const pinning = getDefaultRowPinningState() ``` diff --git a/docs/reference/static-functions/functions/getDefaultRowSelectionState.md b/docs/reference/static-functions/functions/getDefaultRowSelectionState.md index 377690d3d1..487dd9f15a 100644 --- a/docs/reference/static-functions/functions/getDefaultRowSelectionState.md +++ b/docs/reference/static-functions/functions/getDefaultRowSelectionState.md @@ -9,11 +9,12 @@ title: getDefaultRowSelectionState function getDefaultRowSelectionState(): RowSelectionState; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L21) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L22) -Returns the default row selection state. +Creates the default row selection state. -Feature constructors use this value to initialize the table state or option defaults when no user value is provided. +The feature default is an empty map, meaning no rows are selected. Reset APIs +use this value when `defaultState` is `true`. ## Returns @@ -22,5 +23,5 @@ Feature constructors use this value to initialize the table state or option defa ## Example ```ts -const initialValue = getDefaultRowSelectionState() +const selection = getDefaultRowSelectionState() ``` diff --git a/docs/reference/static-functions/functions/isRowSelected.md b/docs/reference/static-functions/functions/isRowSelected.md index 8f2aeb1506..2e5e01e000 100644 --- a/docs/reference/static-functions/functions/isRowSelected.md +++ b/docs/reference/static-functions/functions/isRowSelected.md @@ -9,7 +9,7 @@ title: isRowSelected function isRowSelected(row): boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:669](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L669) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:689](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L689) Returns whether a row id is selected in the current row selection state. @@ -36,5 +36,5 @@ Returns whether a row id is selected in the current row selection state. ## Example ```ts -const selected = isRowSelected(row, selection) +const selected = isRowSelected(row) ``` diff --git a/docs/reference/static-functions/functions/isSubRowSelected.md b/docs/reference/static-functions/functions/isSubRowSelected.md index dcbdb11f8a..7ab95232df 100644 --- a/docs/reference/static-functions/functions/isSubRowSelected.md +++ b/docs/reference/static-functions/functions/isSubRowSelected.md @@ -9,7 +9,7 @@ title: isSubRowSelected function isSubRowSelected(row): boolean | "some" | "all"; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:686](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L686) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:706](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L706) Returns whether all, some, or none of a row's selectable descendants are selected. @@ -38,5 +38,5 @@ The result is used to drive indeterminate row selection UI. ## Example ```ts -const selectedState = isSubRowSelected(row, selection, table) +const selectedState = isSubRowSelected(row) ``` diff --git a/docs/reference/static-functions/functions/row_getCanExpand.md b/docs/reference/static-functions/functions/row_getCanExpand.md index edc84cef82..c850e83d06 100644 --- a/docs/reference/static-functions/functions/row_getCanExpand.md +++ b/docs/reference/static-functions/functions/row_getCanExpand.md @@ -9,11 +9,12 @@ title: row_getCanExpand function row_getCanExpand(row): boolean; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:304](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L304) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:319](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L319) -Returns whether a row can use expand. +Checks whether this row can be expanded. -This evaluates row data, table options, and feature-specific enablement rules. +`options.getRowCanExpand` wins when provided. Otherwise rows can expand when +expanding is enabled and the row has subRows. ## Type Parameters @@ -38,5 +39,5 @@ This evaluates row data, table options, and feature-specific enablement rules. ## Example ```ts -const value = row_getCanExpand(row) +const canExpand = row_getCanExpand(row) ``` diff --git a/docs/reference/static-functions/functions/row_getCanMultiSelect.md b/docs/reference/static-functions/functions/row_getCanMultiSelect.md index e7349fbb63..e96a69251d 100644 --- a/docs/reference/static-functions/functions/row_getCanMultiSelect.md +++ b/docs/reference/static-functions/functions/row_getCanMultiSelect.md @@ -9,11 +9,12 @@ title: row_getCanMultiSelect function row_getCanMultiSelect(row): boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:541](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L541) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:559](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L559) -Returns whether a row can use multi select. +Checks whether this row can be selected alongside other rows. -This evaluates row data, table options, and feature-specific enablement rules. +`options.enableMultiRowSelection` may be a boolean or a row predicate; it +defaults to `true`. ## Type Parameters @@ -38,5 +39,5 @@ This evaluates row data, table options, and feature-specific enablement rules. ## Example ```ts -const value = row_getCanMultiSelect(row) +const canMultiSelect = row_getCanMultiSelect(row) ``` diff --git a/docs/reference/static-functions/functions/row_getCanPin.md b/docs/reference/static-functions/functions/row_getCanPin.md index 8c9f3a07ad..a4a3f26141 100644 --- a/docs/reference/static-functions/functions/row_getCanPin.md +++ b/docs/reference/static-functions/functions/row_getCanPin.md @@ -9,11 +9,12 @@ title: row_getCanPin function row_getCanPin(row): boolean; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:204](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L204) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:213](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L213) -Returns whether a row can use pin. +Checks whether this row can be pinned. -This evaluates row data, table options, and feature-specific enablement rules. +`options.enableRowPinning` may be a boolean or a row predicate; it defaults +to `true`. ## Type Parameters @@ -38,5 +39,5 @@ This evaluates row data, table options, and feature-specific enablement rules. ## Example ```ts -const value = row_getCanPin(row) +const canPin = row_getCanPin(row) ``` diff --git a/docs/reference/static-functions/functions/row_getCanSelect.md b/docs/reference/static-functions/functions/row_getCanSelect.md index ba78a26c9e..ee22e0f02d 100644 --- a/docs/reference/static-functions/functions/row_getCanSelect.md +++ b/docs/reference/static-functions/functions/row_getCanSelect.md @@ -9,11 +9,12 @@ title: row_getCanSelect function row_getCanSelect(row): boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:497](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L497) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:513](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L513) -Returns whether a row can use select. +Checks whether this row can be selected. -This evaluates row data, table options, and feature-specific enablement rules. +`options.enableRowSelection` may be a boolean or a row predicate; it defaults +to `true`. ## Type Parameters @@ -38,5 +39,5 @@ This evaluates row data, table options, and feature-specific enablement rules. ## Example ```ts -const value = row_getCanSelect(row) +const canSelect = row_getCanSelect(row) ``` diff --git a/docs/reference/static-functions/functions/row_getCanSelectSubRows.md b/docs/reference/static-functions/functions/row_getCanSelectSubRows.md index 1e814f9394..dc45bbea8b 100644 --- a/docs/reference/static-functions/functions/row_getCanSelectSubRows.md +++ b/docs/reference/static-functions/functions/row_getCanSelectSubRows.md @@ -9,11 +9,12 @@ title: row_getCanSelectSubRows function row_getCanSelectSubRows(row): boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:519](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L519) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:536](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L536) -Returns whether a row can use select sub rows. +Checks whether selecting this row should also select its subRows. -This evaluates row data, table options, and feature-specific enablement rules. +`options.enableSubRowSelection` may be a boolean or a row predicate; it +defaults to `true`. ## Type Parameters @@ -38,5 +39,5 @@ This evaluates row data, table options, and feature-specific enablement rules. ## Example ```ts -const value = row_getCanSelectSubRows(row) +const canSelectChildren = row_getCanSelectSubRows(row) ``` diff --git a/docs/reference/static-functions/functions/row_getIsAllParentsExpanded.md b/docs/reference/static-functions/functions/row_getIsAllParentsExpanded.md index 4814ab2a95..5b6947c71d 100644 --- a/docs/reference/static-functions/functions/row_getIsAllParentsExpanded.md +++ b/docs/reference/static-functions/functions/row_getIsAllParentsExpanded.md @@ -9,11 +9,11 @@ title: row_getIsAllParentsExpanded function row_getIsAllParentsExpanded(row): boolean; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:324](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L324) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:339](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L339) -Returns is all parents expanded for a row. +Checks whether every ancestor of this row is expanded. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +The current row is not considered; only its parent chain is walked. ## Type Parameters @@ -38,5 +38,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getIsAllParentsExpanded(row) +const parentsExpanded = row_getIsAllParentsExpanded(row) ``` diff --git a/docs/reference/static-functions/functions/row_getIsAllSubRowsSelected.md b/docs/reference/static-functions/functions/row_getIsAllSubRowsSelected.md index 59b37c498f..2ac3ae4c17 100644 --- a/docs/reference/static-functions/functions/row_getIsAllSubRowsSelected.md +++ b/docs/reference/static-functions/functions/row_getIsAllSubRowsSelected.md @@ -9,11 +9,11 @@ title: row_getIsAllSubRowsSelected function row_getIsAllSubRowsSelected(row): boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:480](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L480) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:495](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L495) -Returns is all sub rows selected for a row. +Checks whether all selectable descendants are selected. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +Rows without selectable descendants return false. ## Type Parameters @@ -38,5 +38,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getIsAllSubRowsSelected(row) +const allChildrenSelected = row_getIsAllSubRowsSelected(row) ``` diff --git a/docs/reference/static-functions/functions/row_getIsExpanded.md b/docs/reference/static-functions/functions/row_getIsExpanded.md index 8d8a4d42c4..b90698208c 100644 --- a/docs/reference/static-functions/functions/row_getIsExpanded.md +++ b/docs/reference/static-functions/functions/row_getIsExpanded.md @@ -9,11 +9,12 @@ title: row_getIsExpanded function row_getIsExpanded(row): boolean; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:282](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L282) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:296](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L296) -Returns is expanded for a row. +Checks whether this row is expanded. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +`options.getIsRowExpanded` can override state-derived behavior. Otherwise +the row is expanded when expanded state is `true` or contains this row id. ## Type Parameters @@ -38,5 +39,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getIsExpanded(row) +const expanded = row_getIsExpanded(row) ``` diff --git a/docs/reference/static-functions/functions/row_getIsPinned.md b/docs/reference/static-functions/functions/row_getIsPinned.md index 1f9563411e..7b71961165 100644 --- a/docs/reference/static-functions/functions/row_getIsPinned.md +++ b/docs/reference/static-functions/functions/row_getIsPinned.md @@ -9,11 +9,12 @@ title: row_getIsPinned function row_getIsPinned(row): RowPinningPosition; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:225](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L225) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:235](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L235) -Returns is pinned for a row. +Reads this row's current pinning region. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +Rows listed in `state.rowPinning.top` return `'top'`, rows listed in +`bottom` return `'bottom'`, and unpinned rows return `false`. ## Type Parameters @@ -38,5 +39,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getIsPinned(row) +const position = row_getIsPinned(row) ``` diff --git a/docs/reference/static-functions/functions/row_getIsSelected.md b/docs/reference/static-functions/functions/row_getIsSelected.md index be994c744e..d9872d1e54 100644 --- a/docs/reference/static-functions/functions/row_getIsSelected.md +++ b/docs/reference/static-functions/functions/row_getIsSelected.md @@ -9,11 +9,11 @@ title: row_getIsSelected function row_getIsSelected(row): boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:446](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L446) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:461](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L461) -Returns is selected for a row. +Checks whether this row id is selected in `state.rowSelection`. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +Missing row ids are treated as not selected. ## Type Parameters @@ -38,5 +38,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getIsSelected(row) +const selected = row_getIsSelected(row) ``` diff --git a/docs/reference/static-functions/functions/row_getIsSomeSelected.md b/docs/reference/static-functions/functions/row_getIsSomeSelected.md index b6de180db0..a10e764e02 100644 --- a/docs/reference/static-functions/functions/row_getIsSomeSelected.md +++ b/docs/reference/static-functions/functions/row_getIsSomeSelected.md @@ -9,11 +9,11 @@ title: row_getIsSomeSelected function row_getIsSomeSelected(row): boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:463](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L463) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:478](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L478) -Returns is some selected for a row. +Checks whether some, but not all, selectable descendants are selected. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +This supports indeterminate selection UI for parent rows. ## Type Parameters @@ -38,5 +38,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getIsSomeSelected(row) +const partial = row_getIsSomeSelected(row) ``` diff --git a/docs/reference/static-functions/functions/row_getPinnedIndex.md b/docs/reference/static-functions/functions/row_getPinnedIndex.md index 551e9030ab..436a00811e 100644 --- a/docs/reference/static-functions/functions/row_getPinnedIndex.md +++ b/docs/reference/static-functions/functions/row_getPinnedIndex.md @@ -9,11 +9,11 @@ title: row_getPinnedIndex function row_getPinnedIndex(row): number; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:249](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L249) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:259](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L259) -Returns pinned index for a row. +Finds this row's visible index within its pinned region. -This is the static implementation behind the matching row instance API and may read row caches or table state atoms. +Unpinned rows return `-1`. ## Type Parameters @@ -38,5 +38,5 @@ This is the static implementation behind the matching row instance API and may r ## Example ```ts -const value = row_getPinnedIndex(row) +const index = row_getPinnedIndex(row) ``` diff --git a/docs/reference/static-functions/functions/row_getToggleExpandedHandler.md b/docs/reference/static-functions/functions/row_getToggleExpandedHandler.md index 353c7d2bd5..e424fc4680 100644 --- a/docs/reference/static-functions/functions/row_getToggleExpandedHandler.md +++ b/docs/reference/static-functions/functions/row_getToggleExpandedHandler.md @@ -9,11 +9,11 @@ title: row_getToggleExpandedHandler function row_getToggleExpandedHandler(row): () => void; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:349](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L349) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:364](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L364) -Returns an event handler for toggling expanded handler. +Creates a row control handler that toggles this row's expanded state. -The handler is intended for direct use in row-level controls such as expansion or selection buttons. +The handler is a no-op when the row cannot expand. ## Type Parameters @@ -44,5 +44,5 @@ The handler is intended for direct use in row-level controls such as expansion o ## Example ```ts -const value = row_getToggleExpandedHandler(row) +const onClick = row_getToggleExpandedHandler(row) ``` diff --git a/docs/reference/static-functions/functions/row_getToggleSelectedHandler.md b/docs/reference/static-functions/functions/row_getToggleSelectedHandler.md index 23bdd645ca..9542529102 100644 --- a/docs/reference/static-functions/functions/row_getToggleSelectedHandler.md +++ b/docs/reference/static-functions/functions/row_getToggleSelectedHandler.md @@ -9,11 +9,12 @@ title: row_getToggleSelectedHandler function row_getToggleSelectedHandler(row): (e) => void; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:563](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L563) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:582](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L582) -Returns an event handler for toggling selected handler. +Creates a checkbox-style handler that selects or deselects this row. -The handler is intended for direct use in row-level controls such as expansion or selection buttons. +The handler is a no-op when the row cannot be selected and reads +`event.target.checked`. ## Type Parameters @@ -50,5 +51,5 @@ The handler is intended for direct use in row-level controls such as expansion o ## Example ```ts -const value = row_getToggleSelectedHandler(row) +const onChange = row_getToggleSelectedHandler(row) ``` diff --git a/docs/reference/static-functions/functions/row_pin.md b/docs/reference/static-functions/functions/row_pin.md index 2762690256..023cc05db6 100644 --- a/docs/reference/static-functions/functions/row_pin.md +++ b/docs/reference/static-functions/functions/row_pin.md @@ -13,7 +13,7 @@ function row_pin( includeParentRows?): void; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:276](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L276) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:286](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L286) Pins or unpins a row. diff --git a/docs/reference/static-functions/functions/row_toggleExpanded.md b/docs/reference/static-functions/functions/row_toggleExpanded.md index 63e5129dcc..1bf57b516a 100644 --- a/docs/reference/static-functions/functions/row_toggleExpanded.md +++ b/docs/reference/static-functions/functions/row_toggleExpanded.md @@ -9,11 +9,13 @@ title: row_toggleExpanded function row_toggleExpanded(row, expanded?): void; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:237](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L237) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:250](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L250) -Toggles expanded for a row. +Expands or collapses this row. -The update is routed through the table state updater for the owning feature state slice. +Omitting `expanded` toggles the row. If the current state is expanded-all, +the function first materializes that state into a row-id map before applying +the row-specific change. ## Type Parameters diff --git a/docs/reference/static-functions/functions/row_toggleSelected.md b/docs/reference/static-functions/functions/row_toggleSelected.md index 866902c78d..c190820c60 100644 --- a/docs/reference/static-functions/functions/row_toggleSelected.md +++ b/docs/reference/static-functions/functions/row_toggleSelected.md @@ -12,11 +12,12 @@ function row_toggleSelected( opts?): void; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:403](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L403) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:418](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L418) -Toggles selected for a row. +Selects or deselects this row. -The update is routed through the table state updater for the owning feature state slice. +Omitting `value` toggles the row. Child rows are selected recursively unless +`opts.selectChildren` is `false` or sub-row selection is disabled. ## Type Parameters diff --git a/docs/reference/static-functions/functions/selectRowsFn.md b/docs/reference/static-functions/functions/selectRowsFn.md index 4bfa00fa54..911fb4f9b6 100644 --- a/docs/reference/static-functions/functions/selectRowsFn.md +++ b/docs/reference/static-functions/functions/selectRowsFn.md @@ -9,11 +9,12 @@ title: selectRowsFn function selectRowsFn(rowModel): RowModel; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:618](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L618) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:638](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L638) Builds a row model containing rows selected by the current row selection state. -The result is derived from the supplied row model, so selected ids absent from the current data are not materialized as rows. +The result is derived from the supplied row model, so selected ids absent from +that model are not materialized as rows. ## Type Parameters @@ -38,5 +39,5 @@ The result is derived from the supplied row model, so selected ids absent from t ## Example ```ts -const selectedRows = selectRowsFn(table, rowModel) +const selectedRows = selectRowsFn(rowModel) ``` diff --git a/docs/reference/static-functions/functions/table_autoResetExpanded.md b/docs/reference/static-functions/functions/table_autoResetExpanded.md index 7691b734c5..48763272a1 100644 --- a/docs/reference/static-functions/functions/table_autoResetExpanded.md +++ b/docs/reference/static-functions/functions/table_autoResetExpanded.md @@ -9,11 +9,13 @@ title: table_autoResetExpanded function table_autoResetExpanded(table): void; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L35) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L38) -Schedules an automatic reset for expanded. +Schedules an expanded-state reset after row-structure changes. -The reset only runs when the related feature options allow automatic resets for the current table state change. +The reset runs when `autoResetAll`, `autoResetExpanded`, or the default +client-side expanding behavior allows it. Manual expanding opts out unless +the reset options explicitly opt back in. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_getBottomRows.md b/docs/reference/static-functions/functions/table_getBottomRows.md index 7b78e4ea86..2834171060 100644 --- a/docs/reference/static-functions/functions/table_getBottomRows.md +++ b/docs/reference/static-functions/functions/table_getBottomRows.md @@ -9,11 +9,12 @@ title: table_getBottomRows function table_getBottomRows(table): Row[]; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L163) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:170](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L170) -Returns bottom rows for the table. +Resolves the visible rows pinned to the bottom region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The result follows `state.rowPinning.bottom` order and marks each row with +`position = 'bottom'`. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getBottomRows(table) +const rows = table_getBottomRows(table) ``` diff --git a/docs/reference/static-functions/functions/table_getCanSomeRowsExpand.md b/docs/reference/static-functions/functions/table_getCanSomeRowsExpand.md index 5fe84f9e66..9e84790867 100644 --- a/docs/reference/static-functions/functions/table_getCanSomeRowsExpand.md +++ b/docs/reference/static-functions/functions/table_getCanSomeRowsExpand.md @@ -9,11 +9,12 @@ title: table_getCanSomeRowsExpand function table_getCanSomeRowsExpand(table): boolean; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:117](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L117) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:125](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L125) -Returns can some rows expand for the table. +Checks whether at least one pre-paginated row can expand. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Pagination is intentionally ignored so controls can reflect expandable rows +that may not be on the current page. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getCanSomeRowsExpand(table) +const canExpand = table_getCanSomeRowsExpand(table) ``` diff --git a/docs/reference/static-functions/functions/table_getCenterRows.md b/docs/reference/static-functions/functions/table_getCenterRows.md index beef189d01..0070be0e0d 100644 --- a/docs/reference/static-functions/functions/table_getCenterRows.md +++ b/docs/reference/static-functions/functions/table_getCenterRows.md @@ -9,11 +9,12 @@ title: table_getCenterRows function table_getCenterRows(table): Row[]; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:180](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L180) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:188](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L188) -Returns center rows for the table. +Resolves rows that are not pinned to top or bottom. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The current row model is filtered by `state.rowPinning.top` and +`state.rowPinning.bottom`. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getCenterRows(table) +const rows = table_getCenterRows(table) ``` diff --git a/docs/reference/static-functions/functions/table_getExpandedDepth.md b/docs/reference/static-functions/functions/table_getExpandedDepth.md index 1aa1ddf528..19648d3bfd 100644 --- a/docs/reference/static-functions/functions/table_getExpandedDepth.md +++ b/docs/reference/static-functions/functions/table_getExpandedDepth.md @@ -9,11 +9,12 @@ title: table_getExpandedDepth function table_getExpandedDepth(table): number; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:208](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L208) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:219](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L219) -Returns expanded depth for the table. +Computes the deepest expanded row id depth. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Row ids are split on `.`; expanded-all state scans the current row model, +while explicit expanded state scans its expanded id keys. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getExpandedDepth(table) +const depth = table_getExpandedDepth(table) ``` diff --git a/docs/reference/static-functions/functions/table_getFilteredSelectedRowModel.md b/docs/reference/static-functions/functions/table_getFilteredSelectedRowModel.md index 15717920e9..0cd27a49e1 100644 --- a/docs/reference/static-functions/functions/table_getFilteredSelectedRowModel.md +++ b/docs/reference/static-functions/functions/table_getFilteredSelectedRowModel.md @@ -9,11 +9,12 @@ title: table_getFilteredSelectedRowModel function table_getFilteredSelectedRowModel(table): RowModel; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:193](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L193) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:201](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L201) -Returns filtered selected row model for the table. +Builds a row model containing selected rows from the filtered row model. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +If no row ids are selected, an empty row model is returned without walking +the rows. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getFilteredSelectedRowModel(table) +const selectedRows = table_getFilteredSelectedRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getGroupedSelectedRowModel.md b/docs/reference/static-functions/functions/table_getGroupedSelectedRowModel.md index 14c1ae7fe6..168e31acfe 100644 --- a/docs/reference/static-functions/functions/table_getGroupedSelectedRowModel.md +++ b/docs/reference/static-functions/functions/table_getGroupedSelectedRowModel.md @@ -9,11 +9,12 @@ title: table_getGroupedSelectedRowModel function table_getGroupedSelectedRowModel(table): RowModel; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:220](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L220) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:229](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L229) -Returns grouped selected row model for the table. +Builds a row model containing selected rows from the grouped row model. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +If no row ids are selected, an empty row model is returned without walking +the rows. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getGroupedSelectedRowModel(table) +const selectedRows = table_getGroupedSelectedRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getIsAllPageRowsSelected.md b/docs/reference/static-functions/functions/table_getIsAllPageRowsSelected.md index 900f802da8..89cb672ce2 100644 --- a/docs/reference/static-functions/functions/table_getIsAllPageRowsSelected.md +++ b/docs/reference/static-functions/functions/table_getIsAllPageRowsSelected.md @@ -9,11 +9,11 @@ title: table_getIsAllPageRowsSelected function table_getIsAllPageRowsSelected(table): boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:281](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L281) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:291](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L291) -Returns is all page rows selected for the table. +Checks whether every selectable row on the current page is selected. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Non-selectable rows are ignored for this calculation. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getIsAllPageRowsSelected(table) +const allPageRowsSelected = table_getIsAllPageRowsSelected(table) ``` diff --git a/docs/reference/static-functions/functions/table_getIsAllRowsExpanded.md b/docs/reference/static-functions/functions/table_getIsAllRowsExpanded.md index 35713da049..64f6ab262c 100644 --- a/docs/reference/static-functions/functions/table_getIsAllRowsExpanded.md +++ b/docs/reference/static-functions/functions/table_getIsAllRowsExpanded.md @@ -9,11 +9,12 @@ title: table_getIsAllRowsExpanded function table_getIsAllRowsExpanded(table): boolean; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:174](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L174) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:184](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L184) -Returns is all rows expanded for the table. +Checks whether every row in the current row model is expanded. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The special expanded-all value `true` returns true immediately. Empty +expanded state returns false. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getIsAllRowsExpanded(table) +const allExpanded = table_getIsAllRowsExpanded(table) ``` diff --git a/docs/reference/static-functions/functions/table_getIsAllRowsSelected.md b/docs/reference/static-functions/functions/table_getIsAllRowsSelected.md index 91655c0ac1..ce3d4147bc 100644 --- a/docs/reference/static-functions/functions/table_getIsAllRowsSelected.md +++ b/docs/reference/static-functions/functions/table_getIsAllRowsSelected.md @@ -9,11 +9,12 @@ title: table_getIsAllRowsSelected function table_getIsAllRowsSelected(table): boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:247](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L247) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:257](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L257) -Returns is all rows selected for the table. +Checks whether every selectable filtered row is selected. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The result is false when there are no filtered rows or when selection state is +empty. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getIsAllRowsSelected(table) +const allSelected = table_getIsAllRowsSelected(table) ``` diff --git a/docs/reference/static-functions/functions/table_getIsSomePageRowsSelected.md b/docs/reference/static-functions/functions/table_getIsSomePageRowsSelected.md index ea0f80a8ef..fce6f9d1dd 100644 --- a/docs/reference/static-functions/functions/table_getIsSomePageRowsSelected.md +++ b/docs/reference/static-functions/functions/table_getIsSomePageRowsSelected.md @@ -9,11 +9,12 @@ title: table_getIsSomePageRowsSelected function table_getIsSomePageRowsSelected(table): boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:335](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L335) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:347](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L347) -Returns is some page rows selected for the table. +Checks whether the current page has a partial selection. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +This is false when all selectable page rows are selected. Otherwise it is true +if any selectable page row or descendant is selected. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getIsSomePageRowsSelected(table) +const somePageRowsSelected = table_getIsSomePageRowsSelected(table) ``` diff --git a/docs/reference/static-functions/functions/table_getIsSomeRowsExpanded.md b/docs/reference/static-functions/functions/table_getIsSomeRowsExpanded.md index dd574b7f6e..33c8e198da 100644 --- a/docs/reference/static-functions/functions/table_getIsSomeRowsExpanded.md +++ b/docs/reference/static-functions/functions/table_getIsSomeRowsExpanded.md @@ -9,11 +9,11 @@ title: table_getIsSomeRowsExpanded function table_getIsSomeRowsExpanded(table): boolean; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L156) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:165](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L165) -Returns is some rows expanded for the table. +Checks whether any row is expanded. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The special expanded-all value `true` counts as some rows expanded. ## Type Parameters @@ -38,5 +38,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getIsSomeRowsExpanded(table) +const someExpanded = table_getIsSomeRowsExpanded(table) ``` diff --git a/docs/reference/static-functions/functions/table_getIsSomeRowsPinned.md b/docs/reference/static-functions/functions/table_getIsSomeRowsPinned.md index 6c35932187..b2f131a595 100644 --- a/docs/reference/static-functions/functions/table_getIsSomeRowsPinned.md +++ b/docs/reference/static-functions/functions/table_getIsSomeRowsPinned.md @@ -9,11 +9,12 @@ title: table_getIsSomeRowsPinned function table_getIsSomeRowsPinned(table, position?): boolean; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L88) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:93](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L93) -Returns is some rows pinned for the table. +Checks whether any rows are pinned. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Omit `position` to check both regions, or pass `'top'`/`'bottom'` to inspect +one region. ## Type Parameters @@ -42,5 +43,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getIsSomeRowsPinned(table) +const hasPinnedRows = table_getIsSomeRowsPinned(table) ``` diff --git a/docs/reference/static-functions/functions/table_getIsSomeRowsSelected.md b/docs/reference/static-functions/functions/table_getIsSomeRowsSelected.md index e7236f1f8a..90a2e3371c 100644 --- a/docs/reference/static-functions/functions/table_getIsSomeRowsSelected.md +++ b/docs/reference/static-functions/functions/table_getIsSomeRowsSelected.md @@ -9,11 +9,12 @@ title: table_getIsSomeRowsSelected function table_getIsSomeRowsSelected(table): boolean; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:312](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L312) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:323](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L323) -Returns is some rows selected for the table. +Checks whether selection is partially applied across filtered rows. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The result is true when at least one row id is selected but fewer ids are +selected than the current filtered flat row count. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getIsSomeRowsSelected(table) +const someRowsSelected = table_getIsSomeRowsSelected(table) ``` diff --git a/docs/reference/static-functions/functions/table_getPreSelectedRowModel.md b/docs/reference/static-functions/functions/table_getPreSelectedRowModel.md index d2ed17fbaa..0bf767bf85 100644 --- a/docs/reference/static-functions/functions/table_getPreSelectedRowModel.md +++ b/docs/reference/static-functions/functions/table_getPreSelectedRowModel.md @@ -9,11 +9,12 @@ title: table_getPreSelectedRowModel function table_getPreSelectedRowModel(table): RowModel; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:149](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L149) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:155](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L155) -Returns pre selected row model for the table. +Reads the row model before row selection is projected into selected rows. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +Selection does not alter the base row pipeline, so this returns the core row +model. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getPreSelectedRowModel(table) +const rowsBeforeSelection = table_getPreSelectedRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getSelectedRowModel.md b/docs/reference/static-functions/functions/table_getSelectedRowModel.md index f11370f311..dbf68af3b2 100644 --- a/docs/reference/static-functions/functions/table_getSelectedRowModel.md +++ b/docs/reference/static-functions/functions/table_getSelectedRowModel.md @@ -9,11 +9,12 @@ title: table_getSelectedRowModel function table_getSelectedRowModel(table): RowModel; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:166](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L166) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:173](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L173) -Returns selected row model for the table. +Builds a row model containing selected rows from the core row model. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +If no row ids are selected, an empty row model is returned without walking +the rows. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getSelectedRowModel(table) +const selectedRows = table_getSelectedRowModel(table) ``` diff --git a/docs/reference/static-functions/functions/table_getToggleAllPageRowsSelectedHandler.md b/docs/reference/static-functions/functions/table_getToggleAllPageRowsSelectedHandler.md index 4ac80702b9..d9996b5c27 100644 --- a/docs/reference/static-functions/functions/table_getToggleAllPageRowsSelectedHandler.md +++ b/docs/reference/static-functions/functions/table_getToggleAllPageRowsSelectedHandler.md @@ -9,11 +9,12 @@ title: table_getToggleAllPageRowsSelectedHandler function table_getToggleAllPageRowsSelectedHandler(table): (e) => void; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:379](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L379) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:393](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L393) -Returns an event handler for all page rows selected handler. +Creates a checkbox-style handler that selects or deselects current page rows. -The handler calls the matching table toggle API and can be attached directly to checkbox or button UI. +The handler reads `event.target.checked`, so it is intended for controls whose +checked state means "all page rows selected". ## Type Parameters @@ -50,5 +51,5 @@ The handler calls the matching table toggle API and can be attached directly to ## Example ```ts -const value = table_getToggleAllPageRowsSelectedHandler(table) +const onChange = table_getToggleAllPageRowsSelectedHandler(table) ``` diff --git a/docs/reference/static-functions/functions/table_getToggleAllRowsExpandedHandler.md b/docs/reference/static-functions/functions/table_getToggleAllRowsExpandedHandler.md index 2d5308c239..887216013e 100644 --- a/docs/reference/static-functions/functions/table_getToggleAllRowsExpandedHandler.md +++ b/docs/reference/static-functions/functions/table_getToggleAllRowsExpandedHandler.md @@ -9,11 +9,12 @@ title: table_getToggleAllRowsExpandedHandler function table_getToggleAllRowsExpandedHandler(table): (e) => void; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:136](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L136) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:145](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L145) -Returns an event handler for all rows expanded handler. +Creates an event handler that toggles all rows expanded. -The handler calls the matching table toggle API and can be attached directly to checkbox or button UI. +React-style synthetic events are persisted when present before the table state +is toggled. ## Type Parameters @@ -50,5 +51,5 @@ The handler calls the matching table toggle API and can be attached directly to ## Example ```ts -const value = table_getToggleAllRowsExpandedHandler(table) +const onClick = table_getToggleAllRowsExpandedHandler(table) ``` diff --git a/docs/reference/static-functions/functions/table_getToggleAllRowsSelectedHandler.md b/docs/reference/static-functions/functions/table_getToggleAllRowsSelectedHandler.md index 53dacba73e..3bafd39471 100644 --- a/docs/reference/static-functions/functions/table_getToggleAllRowsSelectedHandler.md +++ b/docs/reference/static-functions/functions/table_getToggleAllRowsSelectedHandler.md @@ -9,11 +9,12 @@ title: table_getToggleAllRowsSelectedHandler function table_getToggleAllRowsSelectedHandler(table): (e) => void; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:357](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L357) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:370](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L370) -Returns an event handler for all rows selected handler. +Creates a checkbox-style handler that selects or deselects all rows. -The handler calls the matching table toggle API and can be attached directly to checkbox or button UI. +The handler reads `event.target.checked`, so it is intended for controls whose +checked state means "all rows selected". ## Type Parameters @@ -50,5 +51,5 @@ The handler calls the matching table toggle API and can be attached directly to ## Example ```ts -const value = table_getToggleAllRowsSelectedHandler(table) +const onChange = table_getToggleAllRowsSelectedHandler(table) ``` diff --git a/docs/reference/static-functions/functions/table_getTopRows.md b/docs/reference/static-functions/functions/table_getTopRows.md index 581248df0c..aa9c39e78e 100644 --- a/docs/reference/static-functions/functions/table_getTopRows.md +++ b/docs/reference/static-functions/functions/table_getTopRows.md @@ -9,11 +9,12 @@ title: table_getTopRows function table_getTopRows(table): Row[]; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:146](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L146) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:152](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L152) -Returns top rows for the table. +Resolves the visible rows pinned to the top region. -This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. +The result follows `state.rowPinning.top` order and marks each row with +`position = 'top'`. ## Type Parameters @@ -38,5 +39,5 @@ This reads the relevant table atoms, options, and row-model cache to derive the ## Example ```ts -const value = table_getTopRows(table) +const rows = table_getTopRows(table) ``` diff --git a/docs/reference/static-functions/functions/table_resetExpanded.md b/docs/reference/static-functions/functions/table_resetExpanded.md index 39c095673a..4983508609 100644 --- a/docs/reference/static-functions/functions/table_resetExpanded.md +++ b/docs/reference/static-functions/functions/table_resetExpanded.md @@ -9,11 +9,12 @@ title: table_resetExpanded function table_resetExpanded(table, defaultState?): void; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L97) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L104) -Resets the table's expanded state slice. +Resets `expanded` to the configured initial state or feature default. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset clones `table.initialState.expanded` when it +exists. Passing `true` ignores initial state and resets to `{}`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_resetRowPinning.md b/docs/reference/static-functions/functions/table_resetRowPinning.md index b4abb43c28..b30f7dd624 100644 --- a/docs/reference/static-functions/functions/table_resetRowPinning.md +++ b/docs/reference/static-functions/functions/table_resetRowPinning.md @@ -9,11 +9,13 @@ title: table_resetRowPinning function table_resetRowPinning(table, defaultState?): void; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L62) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L66) -Resets the table's row pinning state slice. +Resets `rowPinning` to the configured initial state or feature default. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset clones `table.initialState.rowPinning` when it +exists. Passing `true` ignores initial state and resets to empty top/bottom +arrays. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_resetRowSelection.md b/docs/reference/static-functions/functions/table_resetRowSelection.md index d29ad590b5..b93db77bf8 100644 --- a/docs/reference/static-functions/functions/table_resetRowSelection.md +++ b/docs/reference/static-functions/functions/table_resetRowSelection.md @@ -9,11 +9,12 @@ title: table_resetRowSelection function table_resetRowSelection(table, defaultState?): void; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L56) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L59) -Resets the table's row selection state slice. +Resets `rowSelection` to the configured initial state or feature default. -By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. +With no argument, the reset clones `table.initialState.rowSelection` when it +exists. Passing `true` ignores initial state and resets to `{}`. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_setExpanded.md b/docs/reference/static-functions/functions/table_setExpanded.md index d33f135868..29c6a71eea 100644 --- a/docs/reference/static-functions/functions/table_setExpanded.md +++ b/docs/reference/static-functions/functions/table_setExpanded.md @@ -9,11 +9,12 @@ title: table_setExpanded function table_setExpanded(table, updater): void; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L58) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L62) -Updates the table's expanded state slice. +Routes an expanded-state updater through the table's expanded change handler. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +The updater may be `true`, a row-id map, or a function of the previous +expanded state, matching the instance `table.setExpanded` behavior. ## Type Parameters @@ -42,5 +43,5 @@ The updater follows TanStack Table updater semantics and is routed through the c ## Example ```ts -table_setExpanded(table, (old) => old) +table_setExpanded(table, (old) => ({ ...old, [rowId]: true })) ``` diff --git a/docs/reference/static-functions/functions/table_setRowPinning.md b/docs/reference/static-functions/functions/table_setRowPinning.md index aedc30e651..eebe514179 100644 --- a/docs/reference/static-functions/functions/table_setRowPinning.md +++ b/docs/reference/static-functions/functions/table_setRowPinning.md @@ -9,11 +9,12 @@ title: table_setRowPinning function table_setRowPinning(table, updater): void; ``` -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L41) +Defined in: [features/row-pinning/rowPinningFeature.utils.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L43) -Updates the table's row pinning state slice. +Routes a row pinning updater through the table's row-pinning change handler. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +The updater may be a next `{ top, bottom }` state or a function of the +previous state, matching the instance `table.setRowPinning` behavior. ## Type Parameters @@ -42,5 +43,5 @@ The updater follows TanStack Table updater semantics and is routed through the c ## Example ```ts -table_setRowPinning(table, (old) => old) +table_setRowPinning(table, (old) => ({ ...old, top: [rowId] })) ``` diff --git a/docs/reference/static-functions/functions/table_setRowSelection.md b/docs/reference/static-functions/functions/table_setRowSelection.md index 3c57e8a33e..8cfe1ee690 100644 --- a/docs/reference/static-functions/functions/table_setRowSelection.md +++ b/docs/reference/static-functions/functions/table_setRowSelection.md @@ -9,11 +9,12 @@ title: table_setRowSelection function table_setRowSelection(table, updater): void; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L35) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L37) -Updates the table's row selection state slice. +Routes a row selection updater through the table's selection change handler. -The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. +The updater may be a next selection map or a function of the previous map, +matching the instance `table.setRowSelection` behavior. ## Type Parameters @@ -42,5 +43,5 @@ The updater follows TanStack Table updater semantics and is routed through the c ## Example ```ts -table_setRowSelection(table, (old) => old) +table_setRowSelection(table, (old) => ({ ...old, [rowId]: true })) ``` diff --git a/docs/reference/static-functions/functions/table_toggleAllPageRowsSelected.md b/docs/reference/static-functions/functions/table_toggleAllPageRowsSelected.md index b56cc4557a..4c8ba88cec 100644 --- a/docs/reference/static-functions/functions/table_toggleAllPageRowsSelected.md +++ b/docs/reference/static-functions/functions/table_toggleAllPageRowsSelected.md @@ -9,11 +9,12 @@ title: table_toggleAllPageRowsSelected function table_toggleAllPageRowsSelected(table, value?): void; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L119) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:124](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L124) -Toggles all page rows selected for the table. +Selects or deselects every selectable row on the current page. -This is the table-level convenience API used by UI controls that affect many columns or rows at once. +Omitting `value` toggles based on `table_getIsAllPageRowsSelected(table)`. +Child rows are included when sub-row selection allows it. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_toggleAllRowsExpanded.md b/docs/reference/static-functions/functions/table_toggleAllRowsExpanded.md index 3fdf2b60c3..ec6de55eb0 100644 --- a/docs/reference/static-functions/functions/table_toggleAllRowsExpanded.md +++ b/docs/reference/static-functions/functions/table_toggleAllRowsExpanded.md @@ -9,11 +9,13 @@ title: table_toggleAllRowsExpanded function table_toggleAllRowsExpanded(table, expanded?): void; ``` -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L75) +Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L81) -Toggles all rows expanded for the table. +Expands or collapses every row. -This is the table-level convenience API used by UI controls that affect many columns or rows at once. +Passing `true` stores the special expanded-all state. Passing `false` stores +an empty map. Omitting the value toggles based on whether all rows are +currently expanded. ## Type Parameters diff --git a/docs/reference/static-functions/functions/table_toggleAllRowsSelected.md b/docs/reference/static-functions/functions/table_toggleAllRowsSelected.md index e1cf5d682d..d10fdc1c22 100644 --- a/docs/reference/static-functions/functions/table_toggleAllRowsSelected.md +++ b/docs/reference/static-functions/functions/table_toggleAllRowsSelected.md @@ -9,11 +9,12 @@ title: table_toggleAllRowsSelected function table_toggleAllRowsSelected(table, value?): void; ``` -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:78](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L78) +Defined in: [features/row-selection/rowSelectionFeature.utils.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L82) -Toggles all rows selected for the table. +Selects or deselects every selectable row before grouping. -This is the table-level convenience API used by UI controls that affect many columns or rows at once. +Omitting `value` toggles based on `table_getIsAllRowsSelected(table)`. +Deselecting removes matching ids from the existing selection map. ## Type Parameters diff --git a/packages/table-core/src/core/columns/coreColumnsFeature.types.ts b/packages/table-core/src/core/columns/coreColumnsFeature.types.ts index ee5daf544a..d0edbe44a5 100644 --- a/packages/table-core/src/core/columns/coreColumnsFeature.types.ts +++ b/packages/table-core/src/core/columns/coreColumnsFeature.types.ts @@ -48,11 +48,12 @@ export interface Column_Column< TValue extends CellData = CellData, > extends Column_CoreProperties { /** - * Returns the flattened array of this column and all child/grand-child columns for this column. + * Flattens this column and every descendant column into a single array. */ getFlatColumns: () => Array> /** - * Returns an array of all leaf-node columns for this column. If a column has no children, it is considered the only leaf-node column. + * Collects the terminal leaf columns below this column, or the column itself + * when it has no children. */ getLeafColumns: () => Array> } @@ -81,19 +82,19 @@ export interface Table_Columns< */ getAllFlatColumnsById: () => Record> /** - * Returns the default column options to use for all column defs supplied to the table. + * Resolves built-in, feature-level, and user-defined default column options. */ getDefaultColumnDef: () => Partial> /** - * Returns all columns in the table in their normalized and nested hierarchy. + * Normalizes `options.columns` into the table's nested column hierarchy. */ getAllColumns: () => Array> /** - * Returns all columns in the table flattened to a single level. + * Flattens the nested column hierarchy, including parent/group columns. */ getAllFlatColumns: () => Array> /** - * Returns all leaf-node columns in the table flattened to a single level. This does not include parent columns. + * Collects all terminal leaf columns, excluding parent/group columns. */ getAllLeafColumns: () => Array> /** diff --git a/packages/table-core/src/core/headers/coreHeadersFeature.types.ts b/packages/table-core/src/core/headers/coreHeadersFeature.types.ts index bb0e5ebcbf..bc10c9273a 100644 --- a/packages/table-core/src/core/headers/coreHeadersFeature.types.ts +++ b/packages/table-core/src/core/headers/coreHeadersFeature.types.ts @@ -10,19 +10,21 @@ export interface Table_Headers< TData extends RowData, > { /** - * Returns all header groups for the table. + * Builds the visible header groups for the current column tree, visibility, + * and pinning state. */ getHeaderGroups: () => Array> /** - * Returns the footer groups for the table. + * Builds footer groups by reversing the current header group order. */ getFooterGroups: () => Array> /** - * Returns headers for all columns in the table, including parent headers. + * Flattens every header from every header group, including parent and + * placeholder headers. */ getFlatHeaders: () => Array> /** - * Returns headers for all leaf columns in the table, (not including parent headers). + * Collects only leaf headers, excluding parent/group headers. */ getLeafHeaders: () => Array> } diff --git a/packages/table-core/src/core/rows/coreRowsFeature.types.ts b/packages/table-core/src/core/rows/coreRowsFeature.types.ts index 019d46e56e..d1c47d7522 100644 --- a/packages/table-core/src/core/rows/coreRowsFeature.types.ts +++ b/packages/table-core/src/core/rows/coreRowsFeature.types.ts @@ -49,11 +49,11 @@ export interface Row_Row< TData extends RowData, > extends Row_CoreProperties { /** - * Returns all of the cells for the row by column id. + * Builds a lookup of this row's cells keyed by leaf column id. */ getAllCellsByColumnId: () => Record> /** - * Returns all of the cells for the row. + * Builds one cell for each leaf column, including cells for hidden columns. */ getAllCells: () => Array> /** @@ -69,11 +69,11 @@ export interface Row_Row< */ getParentRows: () => Array> /** - * Returns a unique array of values from the row for a given columnId. + * Reads the values this row contributes to faceting/grouping for a column. */ getUniqueValues: (columnId: string) => Array /** - * Returns the value from the row for a given columnId. + * Reads this row's accessor value for a column id and caches the result. */ getValue: (columnId: string) => TValue /** diff --git a/packages/table-core/src/core/table/coreTablesFeature.types.ts b/packages/table-core/src/core/table/coreTablesFeature.types.ts index 369e74891e..a34f306251 100644 --- a/packages/table-core/src/core/table/coreTablesFeature.types.ts +++ b/packages/table-core/src/core/table/coreTablesFeature.types.ts @@ -66,11 +66,15 @@ export interface TableOptions_Table< TData extends RowData, > { /** - * The features that you want to enable for the table. + * The feature modules registered on this table instance. + * + * Feature registration controls which state slices, options, and prototype + * APIs are available. */ readonly _features: TFeatures /** - * The row model options that you want to enable for the table. + * Row model factories used by features such as filtering, grouping, sorting, + * expansion, and pagination. */ readonly _rowModels?: CreateRowModels_All /** diff --git a/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts b/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts index fff7e3f69a..e3c67ffcca 100644 --- a/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts +++ b/packages/table-core/src/features/column-faceting/columnFacetingFeature.types.ts @@ -8,15 +8,18 @@ export interface Column_ColumnFaceting< TData extends RowData, > { /** - * A function that **computes and returns** a min/max tuple derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. + * Computes min/max numeric facet values for this column. */ getFacetedMinMaxValues: () => undefined | [number, number] /** - * A function that **computes and returns** a row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts. + * Computes the row model used to derive this column's facet values. + * + * Other column filters are applied, while this column's own filter is + * excluded. */ getFacetedRowModel: () => RowModel /** - * Returns a `Map` of unique values and their occurrences derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. + * Computes unique facet values and occurrence counts for this column. */ getFacetedUniqueValues: () => Map } @@ -26,18 +29,21 @@ export interface Table_RowModels_Faceted< TData extends RowData, > { /** - * A function that **computes and returns** a min/max tuple derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. - * > Requires that you pass a valid `facetedMinMaxValues` row model factory in `_rowModels`. A default implementation is provided via the exported `createFacetedMinMaxValues` function. + * Computes min/max numeric facet values for the active faceting context. + * + * Requires a `facetedMinMaxValues` row-model factory in `_rowModels`. */ getFacetedMinMaxValues: () => undefined | [number, number] /** - * Returns the row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts. - * > Requires that you pass a valid `facetedRowModel` row model factory in `_rowModels`. A default implementation is provided via the exported `createFacetedRowModel` function. + * Computes the row model used to derive facet values. + * + * Requires a `facetedRowModel` row-model factory in `_rowModels`. */ getFacetedRowModel: () => RowModel /** - * A function that **computes and returns** a `Map` of unique values and their occurrences derived from `column.getFacetedRowModel`. Useful for displaying faceted result values. - * > Requires that you pass a valid `facetedUniqueValues` row model factory in `_rowModels`. A default implementation is provided via the exported `createFacetedUniqueValues` function. + * Computes unique facet values and occurrence counts. + * + * Requires a `facetedUniqueValues` row-model factory in `_rowModels`. */ getFacetedUniqueValues: () => Map } @@ -93,7 +99,7 @@ export interface Table_ColumnFaceting< */ getGlobalFacetedMinMaxValues: () => undefined | [number, number] /** - * Returns the row model for the table after **global** filtering has been applied. + * Computes the row model used to derive global facet values. */ getGlobalFacetedRowModel: () => RowModel /** diff --git a/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts b/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts index f2af966d28..49ea1516c9 100644 --- a/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts +++ b/packages/table-core/src/features/column-filtering/columnFilteringFeature.types.ts @@ -83,7 +83,10 @@ export interface ColumnDef_ColumnFiltering< TData extends RowData, > { /** - * Enables/disables the **column** filter for this column. + * Enables this column to participate in column-specific filtering. + * + * Defaults to `true`; table-level `enableColumnFilters` and `enableFilters` + * must also allow filtering. */ enableColumnFilter?: boolean /** @@ -101,7 +104,7 @@ export interface Column_ColumnFiltering< */ getAutoFilterFn: () => FilterFn /** - * Returns whether or not the column can be **column** filtered. + * Checks whether this accessor column can currently be column-filtered. */ getCanFilter: () => boolean /** @@ -113,15 +116,18 @@ export interface Column_ColumnFiltering< */ getFilterIndex: () => number /** - * Returns the current filter value for the column. + * Reads this column's current value from `state.columnFilters`. */ getFilterValue: () => unknown /** - * Returns whether or not the column is currently filtered. + * Checks whether this column has an active entry in `state.columnFilters`. */ getIsFiltered: () => boolean /** - * A function that sets the current filter value for the column. You can pass it a value or an updater function for immutability-safe operations on existing values. + * Adds, updates, or removes this column's filter value. + * + * Updater functions receive the previous filter value. Values that satisfy + * the filter function's `autoRemove` rule are removed from filter state. */ setFilterValue: (updater: Updater) => void } @@ -145,11 +151,13 @@ export interface TableOptions_ColumnFiltering< TData extends RowData, > { /** - * Enables/disables **column** filtering for all columns. + * Enables column-specific filtering for all columns that also allow it. */ enableColumnFilters?: boolean /** - * Enables/disables all filtering for the table. + * Enables all filtering features for the table. + * + * Set this to `false` to disable both column filtering and global filtering. */ enableFilters?: boolean /** @@ -176,11 +184,13 @@ export interface TableOptions_ColumnFiltering< export interface Table_ColumnFiltering { /** - * Resets the **columnFilters** state to `initialState.columnFilters`, or `true` can be passed to force a default blank state reset to `[]`. + * Resets `columnFilters` to `initialState.columnFilters`. + * + * Pass `true` to ignore initial state and reset to `[]`. */ resetColumnFilters: (defaultState?: boolean) => void /** - * Sets column filter state using a value or updater. + * Updates column filter state with a next array or updater function. */ setColumnFilters: (updater: Updater) => void } @@ -190,11 +200,11 @@ export interface Table_RowModels_Filtered< TData extends RowData, > { /** - * Returns the row model for the table after **column** filtering has been applied. + * Resolves the row model after column and global filters have been applied. */ getFilteredRowModel: () => RowModel /** - * Returns the row model for the table before any **column** filtering has been applied. + * Reads the row model immediately before filtering. */ getPreFilteredRowModel: () => RowModel } diff --git a/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts b/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts index 82d087376f..be9b393b48 100644 --- a/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts +++ b/packages/table-core/src/features/column-grouping/columnGroupingFeature.types.ts @@ -66,7 +66,9 @@ export interface ColumnDef_ColumnGrouping< */ aggregationFn?: AggregationFnOption /** - * Enables/disables grouping for this column. + * Allows this column to be added to grouping state. + * + * Defaults to `true`; table-level `enableGrouping` must also allow grouping. */ enableGrouping?: boolean /** @@ -88,15 +90,15 @@ export interface Column_ColumnGrouping< */ getAutoAggregationFn: () => AggregationFn | undefined /** - * Returns whether or not the column can be grouped. + * Checks whether this column can currently be grouped. */ getCanGroup: () => boolean /** - * Returns the index of the column in the grouping state. + * Finds this column's position in the ordered grouping state. */ getGroupedIndex: () => number /** - * Returns whether or not the column is currently grouped. + * Checks whether this column id is present in grouping state. */ getIsGrouped: () => boolean /** @@ -112,11 +114,11 @@ export interface Column_ColumnGrouping< export interface Row_ColumnGrouping { _groupingValuesCache: Record /** - * Returns the grouping value for any row and column (including leaf rows). + * Reads the value used to group this row for a column id. */ getGroupingValue: (columnId: string) => unknown /** - * Returns whether or not the row is currently grouped. + * Checks whether this row represents a grouped row. */ getIsGrouped: () => boolean /** @@ -131,15 +133,15 @@ export interface Row_ColumnGrouping { export interface Cell_ColumnGrouping { /** - * Returns whether or not the cell is currently aggregated. + * Checks whether this cell should render an aggregated value. */ getIsAggregated: () => boolean /** - * Returns whether or not the cell is currently grouped. + * Checks whether this cell represents the active grouping column. */ getIsGrouped: () => boolean /** - * Returns whether or not the cell is currently a placeholder cell. + * Checks whether this cell is hidden as a grouping placeholder. */ getIsPlaceholder: () => boolean } @@ -151,7 +153,7 @@ export interface ColumnDefaultOptions { export interface TableOptions_ColumnGrouping { /** - * Enables/disables grouping for the table. + * Allows columns to be grouped for this table. */ enableGrouping?: boolean /** @@ -177,11 +179,13 @@ export interface Table_ColumnGrouping< TData extends RowData, > { /** - * Resets the **grouping** state to `initialState.grouping`, or `true` can be passed to force a default blank state reset to `[]`. + * Resets `grouping` to `initialState.grouping`. + * + * Pass `true` to ignore initial state and reset to `[]`. */ resetGrouping: (defaultState?: boolean) => void /** - * Sets grouping state using a value or updater. + * Updates grouping state with a next ordered id array or updater function. */ setGrouping: (updater: Updater) => void } @@ -191,11 +195,11 @@ export interface Table_RowModels_Grouped< TData extends RowData, > { /** - * Returns the row model for the table after grouping has been applied. + * Resolves the row model after grouping and aggregation have been applied. */ getGroupedRowModel: () => RowModel /** - * Returns the row model for the table before any grouping has been applied. + * Reads the row model immediately before grouping. */ getPreGroupedRowModel: () => RowModel } diff --git a/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts b/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts index 470a1dac1b..03e842a6c4 100644 --- a/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts +++ b/packages/table-core/src/features/column-ordering/columnOrderingFeature.types.ts @@ -19,15 +19,22 @@ export interface TableOptions_ColumnOrdering { export interface Column_ColumnOrdering { /** - * Returns the index of the column in the order of the visible columns. Optionally pass a `position` parameter to get the index of the column in a sub-section of the table + * Finds this column's zero-based index among visible columns. + * + * Pass `'left'`, `'center'`, or `'right'` to measure within that pinned + * region instead of the full visible leaf order. */ getIndex: (position?: ColumnPinningPosition | 'center') => number /** - * Returns `true` if the column is the first column in the order of the visible columns. Optionally pass a `position` parameter to check if the column is the first in a sub-section of the table. + * Checks whether this column is the first visible column. + * + * Pass a pinned region to check the first column within that region. */ getIsFirstColumn: (position?: ColumnPinningPosition | 'center') => boolean /** - * Returns `true` if the column is the last column in the order of the visible columns. Optionally pass a `position` parameter to check if the column is the last in a sub-section of the table. + * Checks whether this column is the last visible column. + * + * Pass a pinned region to check the last column within that region. */ getIsLastColumn: (position?: ColumnPinningPosition | 'center') => boolean } @@ -41,11 +48,13 @@ export interface Table_ColumnOrdering< TData extends RowData, > { /** - * Resets the **columnOrder** state to `initialState.columnOrder`, or `true` can be passed to force a default blank state reset to `[]`. + * Resets `columnOrder` to `initialState.columnOrder`. + * + * Pass `true` to ignore initial state and reset to `[]`. */ resetColumnOrder: (defaultState?: boolean) => void /** - * Sets column order state using a value or updater. + * Updates column order state with a next ordered id array or updater function. */ setColumnOrder: (updater: Updater) => void } diff --git a/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts b/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts index cddeefd7b5..88f45420c4 100644 --- a/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts +++ b/packages/table-core/src/features/column-pinning/columnPinningFeature.types.ts @@ -18,7 +18,10 @@ export interface TableState_ColumnPinning { export interface TableOptions_ColumnPinning { /** - * Enables/disables column pinning for the table. Defaults to `true`. + * Allows columns to be pinned into left and right regions. + * + * Defaults to `true`; column-level `enablePinning` can still opt individual + * columns out. */ enableColumnPinning?: boolean /** @@ -35,26 +38,30 @@ export interface ColumnPinningDefaultOptions { export interface ColumnDef_ColumnPinning { /** - * Enables/disables column pinning for this column. Defaults to `true`. + * Allows this column's leaf columns to be pinned. + * + * Defaults to `true`; table-level `enableColumnPinning` must also allow + * pinning. */ enablePinning?: boolean } export interface Column_ColumnPinning { /** - * Returns whether or not the column can be pinned. + * Checks whether this column or any of its leaves can be pinned. */ getCanPin: () => boolean /** - * Returns the pinned position of the column. (`'left'`, `'right'` or `false`) + * Reads the column's pinned position: `'left'`, `'right'`, or `false`. */ getIsPinned: () => ColumnPinningPosition /** - * Returns the numeric pinned index of the column within a pinned column group. + * Finds this column's index within its pinned region. */ getPinnedIndex: () => number /** - * Pins a column to the `'left'` or `'right'`, or unpins the column to the center if `false` is passed. + * Pins this column's leaf columns left or right, or unpins them when `false` + * is passed. */ pin: (position: ColumnPinningPosition) => void } @@ -64,15 +71,15 @@ export interface Row_ColumnPinning< TData extends RowData, > { /** - * Returns all center pinned (unpinned) leaf cells in the row. + * Gets visible row cells whose columns are not pinned left or right. */ getCenterVisibleCells: () => Array> /** - * Returns all left pinned leaf cells in the row. + * Gets visible row cells whose columns are pinned left. */ getLeftVisibleCells: () => Array> /** - * Returns all right pinned leaf cells in the row. + * Gets visible row cells whose columns are pinned right. */ getRightVisibleCells: () => Array> } @@ -82,87 +89,92 @@ export interface Table_ColumnPinning< TData extends RowData, > { /** - * If pinning, returns headers for all columns that are not pinned, including parent headers. + * Builds flat center-region headers for columns that are not pinned, + * including parent headers. */ getCenterFlatHeaders: () => Array> /** - * If pinning, returns the footer groups for columns that are not pinned. + * Builds footer groups for the center region of unpinned columns. */ getCenterFooterGroups: () => Array> /** - * If pinning, returns the header groups for columns that are not pinned. + * Builds header groups for the center region of unpinned columns. */ getCenterHeaderGroups: () => Array> /** - * Returns all center pinned (unpinned) leaf columns. + * Gets leaf columns that are not pinned left or right. */ getCenterLeafColumns: () => Array> /** - * If pinning, returns headers for all columns that are not pinned, (not including parent headers). + * Builds center-region leaf headers for columns that are not pinned. */ getCenterLeafHeaders: () => Array> /** - * If column pinning, returns a flat array of leaf-node columns that are visible in the unpinned/center portion of the table. + * Lists visible leaf columns in the unpinned center region. */ getCenterVisibleLeafColumns: () => Array> /** - * Returns whether or not any columns are pinned. Optionally specify to only check for pinned columns in either the `left` or `right` position. + * Checks whether any columns are pinned, optionally limited to one side. */ getIsSomeColumnsPinned: (position?: ColumnPinningPosition) => boolean /** - * If pinning, returns headers for all left pinned columns in the table, including parent headers. + * Builds flat left-region headers for pinned columns, including parent + * headers. */ getLeftFlatHeaders: () => Array> /** - * If pinning, returns the footer groups for the left pinned columns. + * Builds footer groups for left-pinned columns. */ getLeftFooterGroups: () => Array> /** - * If pinning, returns the header groups for the left pinned columns. + * Builds header groups for left-pinned columns. */ getLeftHeaderGroups: () => Array> /** - * Returns all left pinned leaf columns. + * Gets leaf columns pinned to the left region in pinning-state order. */ getLeftLeafColumns: () => Array> /** - * If pinning, returns headers for all left pinned leaf columns in the table, (not including parent headers). + * Builds leaf headers for left-pinned columns. */ getLeftLeafHeaders: () => Array> /** - * If column pinning, returns a flat array of leaf-node columns that are visible in the left portion of the table. + * Lists visible leaf columns in the left pinned region. */ getLeftVisibleLeafColumns: () => Array> /** - * If pinning, returns headers for all right pinned columns in the table, including parent headers. + * Builds flat right-region headers for pinned columns, including parent + * headers. */ getRightFlatHeaders: () => Array> /** - * If pinning, returns the footer groups for the right pinned columns. + * Builds footer groups for right-pinned columns. */ getRightFooterGroups: () => Array> /** - * If pinning, returns the header groups for the right pinned columns. + * Builds header groups for right-pinned columns. */ getRightHeaderGroups: () => Array> /** - * Returns all right pinned leaf columns. + * Gets leaf columns pinned to the right region in pinning-state order. */ getRightLeafColumns: () => Array> /** - * If pinning, returns headers for all right pinned leaf columns in the table, (not including parent headers). + * Builds leaf headers for right-pinned columns. */ getRightLeafHeaders: () => Array> /** - * If column pinning, returns a flat array of leaf-node columns that are visible in the right portion of the table. + * Lists visible leaf columns in the right pinned region. */ getRightVisibleLeafColumns: () => Array> /** - * Resets the **columnPinning** state to `initialState.columnPinning`, or `true` can be passed to force a default blank state reset to `{ left: [], right: [], }`. + * Resets `columnPinning` to `initialState.columnPinning`. + * + * Pass `true` to ignore initial state and reset to empty left/right arrays. */ resetColumnPinning: (defaultState?: boolean) => void /** - * Sets column pinning state using a value or updater. + * Updates column pinning state with a next state or updater function. */ setColumnPinning: (updater: Updater) => void /** @@ -172,7 +184,7 @@ export interface Table_ColumnPinning< position: ColumnPinningPosition | 'center', ) => Array> /** - * Returns visible pinned leaf columns for the requested pinning region. + * Lists visible leaf columns for the requested pinning region. */ getPinnedVisibleLeafColumns: ( position: ColumnPinningPosition | 'center', diff --git a/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts b/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts index 591e89a652..d8c827ce66 100644 --- a/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts +++ b/packages/table-core/src/features/column-resizing/columnResizingFeature.types.ts @@ -47,12 +47,13 @@ export type ColumnResizingDefaultOptions = Pick< export interface Table_ColumnResizing { /** - * Resets transient resize interaction state to `initialState.columnResizing`. - * Pass `true` to reset to the feature's default blank resize state instead. + * Resets `columnResizing` to `initialState.columnResizing`. + * + * Pass `true` to ignore initial state and reset to the no-drag default state. */ resetHeaderSizeInfo: (defaultState?: boolean) => void /** - * Sets the transient resize interaction state using a value or updater. + * Updates transient resize interaction state with a next state or updater function. * * The lowercase `c` in this API name matches the current generated v9 table * API for the `columnResizing` state slice. @@ -69,21 +70,20 @@ export interface ColumnDef_ColumnResizing { export interface Column_ColumnResizing { /** - * Returns `true` if the column can be resized. + * Checks whether this column can start a resize interaction. */ getCanResize: () => boolean /** - * Returns `true` if the column is currently being resized. + * Checks whether this column is the active resize target. */ getIsResizing: () => boolean } export interface Header_ColumnResizing { /** - * Returns an event handler function that can be used to resize the header. It can be used as an: - * - `onMouseDown` handler - * - `onTouchStart` handler - * The dragging and release events are automatically handled for you. + * Creates the `onMouseDown`/`onTouchStart` handler for a resize handle. + * + * Dragging and release listeners are installed and cleaned up automatically. */ getResizeHandler: (context?: Document) => (event: unknown) => void } diff --git a/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts b/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts index 55b63d4b38..4a6730fbf4 100644 --- a/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts +++ b/packages/table-core/src/features/column-sizing/columnSizingFeature.types.ts @@ -23,19 +23,19 @@ export type ColumnSizingDefaultOptions = Pick< export interface Table_ColumnSizing { /** - * If pinning, returns the total size of the center portion of the table by calculating the sum of the sizes of all unpinned/center leaf-columns. + * Sums the current sizes of visible center-region leaf columns. */ getCenterTotalSize: () => number /** - * Returns the total size of the left portion of the table by calculating the sum of the sizes of all left leaf-columns. + * Sums the current sizes of visible left-pinned leaf columns. */ getLeftTotalSize: () => number /** - * Returns the total size of the right portion of the table by calculating the sum of the sizes of all right leaf-columns. + * Sums the current sizes of visible right-pinned leaf columns. */ getRightTotalSize: () => number /** - * Returns the total size of the table by calculating the sum of the sizes of all leaf-columns. + * Sums the current sizes of all visible leaf columns. */ getTotalSize: () => number /** @@ -44,37 +44,44 @@ export interface Table_ColumnSizing { */ resetColumnSizing: (defaultState?: boolean) => void /** - * Sets committed column sizing state using a value or updater. + * Updates committed column sizing state with a next map or updater function. */ setColumnSizing: (updater: Updater) => void } export interface ColumnDef_ColumnSizing { /** - * The maximum allowed size for the column + * Upper bound used when resolving this column's size. */ maxSize?: number /** - * The minimum allowed size for the column + * Lower bound used when resolving this column's size. */ minSize?: number /** - * The desired size for the column + * Initial size used before column sizing state overrides it. */ size?: number } export interface Column_ColumnSizing { /** - * Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all succeeding (right) headers in relation to the current column. + * Measures the offset from this column's end edge to the end of its region. + * + * Pass a pinned region to measure within that region. The value is the sum + * of visible leaf column sizes after this column. */ getAfter: (position?: ColumnPinningPosition | 'center') => number /** - * Returns the current size of the column. + * Resolves the column's current size after state and min/max constraints. */ getSize: () => number /** - * Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding (left) headers in relation to the current column. + * Measures the offset from the start of this column's region to its start + * edge. + * + * Pass a pinned region to measure within that region. The value is the sum + * of visible leaf column sizes before this column. */ getStart: (position?: ColumnPinningPosition | 'center') => number /** @@ -85,7 +92,7 @@ export interface Column_ColumnSizing { export interface Header_ColumnSizing { /** - * Returns the current size of the header. + * Computes this header's rendered size from its leaf columns. */ getSize: () => number /** diff --git a/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts b/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts index bf9e8560a7..2276e65db0 100644 --- a/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts +++ b/packages/table-core/src/features/column-visibility/columnVisibilityFeature.types.ts @@ -32,31 +32,34 @@ export interface Table_ColumnVisibility< TData extends RowData, > { /** - * Returns whether all columns are visible + * Checks whether every leaf column is currently visible. */ getIsAllColumnsVisible: () => boolean /** - * Returns whether any columns are visible + * Checks whether at least one leaf column is currently visible. */ getIsSomeColumnsVisible: () => boolean /** - * Returns a handler for toggling the visibility of all columns, meant to be bound to a `input[type=checkbox]` element. + * Creates a checkbox-style handler that shows or hides all columns. */ getToggleAllColumnsVisibilityHandler: () => (event: unknown) => void /** - * Returns a flat array of columns that are visible, including parent columns. + * Lists visible columns in flat table order, including parent columns that + * have visible descendants. */ getVisibleFlatColumns: () => Array> /** - * Returns a flat array of leaf-node columns that are visible. + * Lists visible leaf columns in the order used for row cells and headers. */ getVisibleLeafColumns: () => Array> /** - * Resets the column visibility state to the initial state. If `defaultState` is provided, the state will be reset to `{}` + * Resets `columnVisibility` to `initialState.columnVisibility`. + * + * Pass `true` to ignore initial state and reset to `{}`. */ resetColumnVisibility: (defaultState?: boolean) => void /** - * Sets column visibility state using a value or updater. + * Updates column visibility state with a next map or updater function. */ setColumnVisibility: (updater: Updater) => void /** @@ -67,7 +70,7 @@ export interface Table_ColumnVisibility< export interface ColumnDef_ColumnVisibility { /** - * Enables/disables column hiding for this column. Defaults to `true`. + * Allows this column to be hidden. Defaults to `true`. */ enableHiding?: boolean } @@ -77,11 +80,11 @@ export interface Row_ColumnVisibility< TData extends RowData, > { /** - * Returns an array of cells that account for column visibility for the row. + * Gets this row's cells for currently visible columns. */ getVisibleCells: () => Array> /** - * Returns visible cells by column id for the row. + * Maps this row's currently visible cells by column id. */ getVisibleCellsByColumnId: () => Record< string, @@ -91,15 +94,15 @@ export interface Row_ColumnVisibility< export interface Column_ColumnVisibility { /** - * Returns whether the column can be hidden + * Checks whether this column is allowed to be hidden. */ getCanHide: () => boolean /** - * Returns whether the column is visible + * Checks whether this column is currently visible. */ getIsVisible: () => boolean /** - * Returns a function that can be used to toggle the column visibility. This function can be used to bind to an event handler to a checkbox. + * Creates a checkbox-style handler that toggles this column's visibility. */ getToggleVisibilityHandler: () => (event: unknown) => void /** diff --git a/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts b/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts index 9668d55662..1c192b3081 100644 --- a/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts +++ b/packages/table-core/src/features/global-filtering/globalFilteringFeature.types.ts @@ -17,14 +17,17 @@ export interface TableState_GlobalFiltering { export interface ColumnDef_GlobalFiltering { /** - * Enables/disables the **global** filter for this column. + * Allows this column to be scanned by global filtering. + * + * Defaults to `true`; table-level global filtering and `enableFilters` must + * also allow filtering. */ enableGlobalFilter?: boolean } export interface Column_GlobalFiltering { /** - * Returns whether or not the column can be **globally** filtered. Set to `false` to disable a column from being scanned during global filtering. + * Checks whether this accessor column participates in global filtering. */ getCanGlobalFilter: () => boolean } @@ -34,7 +37,7 @@ export interface TableOptions_GlobalFiltering< TData extends RowData, > { /** - * Enables/disables **global** filtering for all columns. + * Enables global filtering across columns that allow it. */ enableGlobalFilter?: boolean /** @@ -76,11 +79,13 @@ export interface Table_GlobalFiltering< */ getGlobalFilterFn: () => FilterFn | undefined /** - * Resets the **globalFilter** state to `initialState.globalFilter`, or `true` can be passed to force a default blank state reset to `undefined`. + * Resets `globalFilter` to `initialState.globalFilter`. + * + * Pass `true` to ignore initial state and reset to `undefined`. */ resetGlobalFilter: (defaultState?: boolean) => void /** - * Sets global filter state using a value or updater. + * Updates global filter state with a next value or updater function. */ setGlobalFilter: (updater: Updater) => void } diff --git a/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts b/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts index d459cb24e1..9d125fa8ca 100644 --- a/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts +++ b/packages/table-core/src/features/row-expanding/rowExpandingFeature.types.ts @@ -13,19 +13,19 @@ export interface TableState_RowExpanding { export interface Row_RowExpanding { /** - * Returns whether the row can be expanded. + * Checks whether this row can be expanded. */ getCanExpand: () => boolean /** - * Returns whether all parent rows of the row are expanded. + * Checks whether every ancestor of this row is expanded. */ getIsAllParentsExpanded: () => boolean /** - * Returns whether the row is expanded. + * Checks whether this row is currently expanded. */ getIsExpanded: () => boolean /** - * Returns a function that can be used to toggle the expanded state of the row. This function can be used to bind to an event handler to a button. + * Creates a handler that toggles this row's expanded state. */ getToggleExpandedHandler: () => () => void /** @@ -43,7 +43,7 @@ export interface TableOptions_RowExpanding< */ autoResetExpanded?: boolean /** - * Enable/disable expanding for all rows. + * Allows rows with subRows to be expanded. */ enableExpanding?: boolean /** @@ -76,32 +76,33 @@ export interface Table_RowExpanding< > { autoResetExpanded: () => void /** - * Returns whether there are any rows that can be expanded. + * Checks whether at least one row can be expanded. */ getCanSomeRowsExpand: () => boolean /** - * Returns the maximum depth of the expanded rows. + * Computes the deepest expanded row id depth. */ getExpandedDepth: () => number /** - * Returns whether all rows are currently expanded. + * Checks whether all rows in the current row model are expanded. */ getIsAllRowsExpanded: () => boolean /** - * Returns whether there are any rows that are currently expanded. + * Checks whether any row is currently expanded. */ getIsSomeRowsExpanded: () => boolean /** - * Returns a handler that can be used to toggle the expanded state of all rows. This handler is meant to be used with an `input[type=checkbox]` element. + * Creates a handler that toggles all rows expanded. */ getToggleAllRowsExpandedHandler: () => (event: unknown) => void /** - * Resets expanded state to `initialState.expanded`. Pass `true` to reset to - * the feature default of `{}`. + * Resets `expanded` to `initialState.expanded`. + * + * Pass `true` to ignore initial state and reset to `{}`. */ resetExpanded: (defaultState?: boolean) => void /** - * Sets expanded state using a value or updater. + * Updates expanded state with `true`, a row-id map, or an updater function. */ setExpanded: (updater: Updater) => void /** @@ -115,11 +116,11 @@ export interface Table_RowModels_Expanded< TData extends RowData, > { /** - * Returns the row model after expansion has been applied. + * Resolves the row model after expanded rows have been flattened into view. */ getExpandedRowModel: () => RowModel /** - * Returns the row model before expansion has been applied. + * Reads the row model immediately before expansion. */ getPreExpandedRowModel: () => RowModel } diff --git a/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts b/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts index 84cbe1be42..cb99ad56f2 100644 --- a/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts +++ b/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts @@ -9,13 +9,14 @@ import type { } from './rowExpandingFeature.types' /** - * Returns the default expanded state. + * Creates the default expanded state. * - * Feature constructors use this value to initialize the table state or option defaults when no user value is provided. + * The feature default is an empty map, meaning no rows are expanded. Reset APIs + * use this value when `defaultState` is `true`. * * @example * ```ts - * const initialValue = getDefaultExpandedState() + * const expanded = getDefaultExpandedState() * ``` */ export function getDefaultExpandedState(): ExpandedState { @@ -23,9 +24,11 @@ export function getDefaultExpandedState(): ExpandedState { } /** - * Schedules an automatic reset for expanded. + * Schedules an expanded-state reset after row-structure changes. * - * The reset only runs when the related feature options allow automatic resets for the current table state change. + * The reset runs when `autoResetAll`, `autoResetExpanded`, or the default + * client-side expanding behavior allows it. Manual expanding opts out unless + * the reset options explicitly opt back in. * * @example * ```ts @@ -46,13 +49,14 @@ export function table_autoResetExpanded< } /** - * Updates the table's expanded state slice. + * Routes an expanded-state updater through the table's expanded change handler. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * The updater may be `true`, a row-id map, or a function of the previous + * expanded state, matching the instance `table.setExpanded` behavior. * * @example * ```ts - * table_setExpanded(table, (old) => old) + * table_setExpanded(table, (old) => ({ ...old, [rowId]: true })) * ``` */ export function table_setExpanded< @@ -63,9 +67,11 @@ export function table_setExpanded< } /** - * Toggles all rows expanded for the table. + * Expands or collapses every row. * - * This is the table-level convenience API used by UI controls that affect many columns or rows at once. + * Passing `true` stores the special expanded-all state. Passing `false` stores + * an empty map. Omitting the value toggles based on whether all rows are + * currently expanded. * * @example * ```ts @@ -84,9 +90,10 @@ export function table_toggleAllRowsExpanded< } /** - * Resets the table's expanded state slice. + * Resets `expanded` to the configured initial state or feature default. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset clones `table.initialState.expanded` when it + * exists. Passing `true` ignores initial state and resets to `{}`. * * @example * ```ts @@ -105,13 +112,14 @@ export function table_resetExpanded< } /** - * Returns can some rows expand for the table. + * Checks whether at least one pre-paginated row can expand. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Pagination is intentionally ignored so controls can reflect expandable rows + * that may not be on the current page. * * @example * ```ts - * const value = table_getCanSomeRowsExpand(table) + * const canExpand = table_getCanSomeRowsExpand(table) * ``` */ export function table_getCanSomeRowsExpand< @@ -124,13 +132,14 @@ export function table_getCanSomeRowsExpand< } /** - * Returns an event handler for all rows expanded handler. + * Creates an event handler that toggles all rows expanded. * - * The handler calls the matching table toggle API and can be attached directly to checkbox or button UI. + * React-style synthetic events are persisted when present before the table state + * is toggled. * * @example * ```ts - * const value = table_getToggleAllRowsExpandedHandler(table) + * const onClick = table_getToggleAllRowsExpandedHandler(table) * ``` */ export function table_getToggleAllRowsExpandedHandler< @@ -144,13 +153,13 @@ export function table_getToggleAllRowsExpandedHandler< } /** - * Returns is some rows expanded for the table. + * Checks whether any row is expanded. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The special expanded-all value `true` counts as some rows expanded. * * @example * ```ts - * const value = table_getIsSomeRowsExpanded(table) + * const someExpanded = table_getIsSomeRowsExpanded(table) * ``` */ export function table_getIsSomeRowsExpanded< @@ -162,13 +171,14 @@ export function table_getIsSomeRowsExpanded< } /** - * Returns is all rows expanded for the table. + * Checks whether every row in the current row model is expanded. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The special expanded-all value `true` returns true immediately. Empty + * expanded state returns false. * * @example * ```ts - * const value = table_getIsAllRowsExpanded(table) + * const allExpanded = table_getIsAllRowsExpanded(table) * ``` */ export function table_getIsAllRowsExpanded< @@ -196,13 +206,14 @@ export function table_getIsAllRowsExpanded< } /** - * Returns expanded depth for the table. + * Computes the deepest expanded row id depth. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Row ids are split on `.`; expanded-all state scans the current row model, + * while explicit expanded state scans its expanded id keys. * * @example * ```ts - * const value = table_getExpandedDepth(table) + * const depth = table_getExpandedDepth(table) * ``` */ export function table_getExpandedDepth< @@ -225,9 +236,11 @@ export function table_getExpandedDepth< } /** - * Toggles expanded for a row. + * Expands or collapses this row. * - * The update is routed through the table state updater for the owning feature state slice. + * Omitting `expanded` toggles the row. If the current state is expanded-all, + * the function first materializes that state into a row-id map before applying + * the row-specific change. * * @example * ```ts @@ -270,13 +283,14 @@ export function row_toggleExpanded< } /** - * Returns is expanded for a row. + * Checks whether this row is expanded. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * `options.getIsRowExpanded` can override state-derived behavior. Otherwise + * the row is expanded when expanded state is `true` or contains this row id. * * @example * ```ts - * const value = row_getIsExpanded(row) + * const expanded = row_getIsExpanded(row) * ``` */ export function row_getIsExpanded< @@ -292,13 +306,14 @@ export function row_getIsExpanded< } /** - * Returns whether a row can use expand. + * Checks whether this row can be expanded. * - * This evaluates row data, table options, and feature-specific enablement rules. + * `options.getRowCanExpand` wins when provided. Otherwise rows can expand when + * expanding is enabled and the row has subRows. * * @example * ```ts - * const value = row_getCanExpand(row) + * const canExpand = row_getCanExpand(row) * ``` */ export function row_getCanExpand< @@ -312,13 +327,13 @@ export function row_getCanExpand< } /** - * Returns is all parents expanded for a row. + * Checks whether every ancestor of this row is expanded. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * The current row is not considered; only its parent chain is walked. * * @example * ```ts - * const value = row_getIsAllParentsExpanded(row) + * const parentsExpanded = row_getIsAllParentsExpanded(row) * ``` */ export function row_getIsAllParentsExpanded< @@ -337,13 +352,13 @@ export function row_getIsAllParentsExpanded< } /** - * Returns an event handler for toggling expanded handler. + * Creates a row control handler that toggles this row's expanded state. * - * The handler is intended for direct use in row-level controls such as expansion or selection buttons. + * The handler is a no-op when the row cannot expand. * * @example * ```ts - * const value = row_getToggleExpandedHandler(row) + * const onClick = row_getToggleExpandedHandler(row) * ``` */ export function row_getToggleExpandedHandler< diff --git a/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts b/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts index 607bd5a3c7..e69b232097 100644 --- a/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts +++ b/packages/table-core/src/features/row-pagination/rowPaginationFeature.types.ts @@ -47,23 +47,26 @@ export interface Table_RowPagination< > { _autoResetPageIndex: () => void /** - * Returns whether the table can go to the next page. + * Checks whether the current page index can move forward. */ getCanNextPage: () => boolean /** - * Returns whether the table can go to the previous page. + * Checks whether the current page index can move backward. */ getCanPreviousPage: () => boolean /** - * Returns the page count. If manually paginating or controlling the pagination state, this will come directly from the `options.pageCount` table option, otherwise it will be calculated from the table data using the total row count and current page size. + * Resolves the current page count from `options.pageCount` or row count and + * page size. */ getPageCount: () => number /** - * Returns the row count. If manually paginating or controlling the pagination state, this will come directly from the `options.rowCount` table option, otherwise it will be calculated from the table data. + * Resolves the row count used for pagination math. + * + * `options.rowCount` wins; otherwise the pre-paginated row model is counted. */ getRowCount: () => number /** - * Returns an array of page options (zero-index-based) for the current page size. + * Builds zero-based page indexes for the current page count. */ getPageOptions: () => Array /** @@ -83,16 +86,20 @@ export interface Table_RowPagination< */ lastPage: () => void /** - * Resets the page index to its initial state. If `defaultState` is `true`, the page index will be reset to `0` regardless of initial state. + * Resets `pagination.pageIndex` to initial state, or to `0` when + * `defaultState` is `true`. */ resetPageIndex: (defaultState?: boolean) => void /** - * Resets the page size to its initial state. If `defaultState` is `true`, the page size will be reset to `10` regardless of initial state. + * Resets `pagination.pageSize` to initial state, or to `10` when + * `defaultState` is `true`. */ resetPageSize: (defaultState?: boolean) => void /** - * Resets pagination state to `initialState.pagination`. Pass `true` to reset - * to the feature default of `{ pageIndex: 0, pageSize: 10 }`. + * Resets `pagination` to `initialState.pagination`. + * + * Pass `true` to ignore initial state and reset to + * `{ pageIndex: 0, pageSize: 10 }`. */ resetPagination: (defaultState?: boolean) => void /** @@ -104,7 +111,7 @@ export interface Table_RowPagination< */ setPageSize: (updater: Updater) => void /** - * Sets pagination state using a value or updater. + * Updates pagination state with a next state or updater function. */ setPagination: (updater: Updater) => void } @@ -114,11 +121,11 @@ export interface Table_RowModels_Paginated< TData extends RowData, > { /** - * Returns the row model for the table after pagination has been applied. + * Resolves the row model after pagination has sliced the current page. */ getPaginatedRowModel: () => RowModel /** - * Returns the row model for the table before any pagination has been applied. + * Reads the row model immediately before pagination. */ getPrePaginatedRowModel: () => RowModel } diff --git a/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts b/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts index 64fcb8b5de..4f19f9ce64 100644 --- a/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts +++ b/packages/table-core/src/features/row-pinning/rowPinningFeature.types.ts @@ -18,7 +18,9 @@ export interface TableOptions_RowPinning< TData extends RowData, > { /** - * Enables/disables row pinning for the table. Defaults to `true`. + * Allows rows to be pinned to top or bottom regions. + * + * Provide a predicate to decide per row. Defaults to `true`. */ enableRowPinning?: boolean | ((row: Row) => boolean) /** @@ -39,7 +41,7 @@ export interface RowPinningDefaultOptions { export interface Row_RowPinning { /** - * Returns whether or not the row can be pinned. + * Checks whether this row can be pinned. */ getCanPin: () => boolean /** @@ -65,27 +67,29 @@ export interface Table_RowPinning< TData extends RowData, > { /** - * Returns all bottom pinned rows. + * Gets rows pinned to the bottom region. */ getBottomRows: () => Array> /** - * Returns all rows that are not pinned to the top or bottom. + * Gets rows that are not pinned to the top or bottom region. */ getCenterRows: () => Array> /** - * Returns whether or not any rows are pinned. Optionally specify to only check for pinned rows in either the `top` or `bottom` position. + * Checks whether any rows are pinned, optionally limited to one region. */ getIsSomeRowsPinned: (position?: RowPinningPosition) => boolean /** - * Returns all top pinned rows. + * Gets rows pinned to the top region. */ getTopRows: () => Array> /** - * Resets the **rowPinning** state to `initialState.rowPinning`, or `true` can be passed to force a default blank state reset to `{ top: [], bottom: [], }`. + * Resets `rowPinning` to `initialState.rowPinning`. + * + * Pass `true` to ignore initial state and reset to empty top/bottom arrays. */ resetRowPinning: (defaultState?: boolean) => void /** - * Sets row pinning state using a value or updater. + * Updates row pinning state with a next state or updater function. */ setRowPinning: (updater: Updater) => void } diff --git a/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts b/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts index 57ab0e4c5d..085d1d06c9 100644 --- a/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts +++ b/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts @@ -12,13 +12,14 @@ import type { // State Utils /** - * Returns the default row pinning state. + * Creates the default row pinning state. * - * Feature constructors use this value to initialize the table state or option defaults when no user value is provided. + * Both pinning regions start empty. Reset APIs use this value when + * `defaultState` is `true`. * * @example * ```ts - * const initialValue = getDefaultRowPinningState() + * const pinning = getDefaultRowPinningState() * ``` */ export function getDefaultRowPinningState(): RowPinningState { @@ -29,13 +30,14 @@ export function getDefaultRowPinningState(): RowPinningState { } /** - * Updates the table's row pinning state slice. + * Routes a row pinning updater through the table's row-pinning change handler. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * The updater may be a next `{ top, bottom }` state or a function of the + * previous state, matching the instance `table.setRowPinning` behavior. * * @example * ```ts - * table_setRowPinning(table, (old) => old) + * table_setRowPinning(table, (old) => ({ ...old, top: [rowId] })) * ``` */ export function table_setRowPinning< @@ -49,9 +51,11 @@ export function table_setRowPinning< } /** - * Resets the table's row pinning state slice. + * Resets `rowPinning` to the configured initial state or feature default. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset clones `table.initialState.rowPinning` when it + * exists. Passing `true` ignores initial state and resets to empty top/bottom + * arrays. * * @example * ```ts @@ -76,13 +80,14 @@ export function table_resetRowPinning< // Table Utils /** - * Returns is some rows pinned for the table. + * Checks whether any rows are pinned. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Omit `position` to check both regions, or pass `'top'`/`'bottom'` to inspect + * one region. * * @example * ```ts - * const value = table_getIsSomeRowsPinned(table) + * const hasPinnedRows = table_getIsSomeRowsPinned(table) * ``` */ export function table_getIsSomeRowsPinned< @@ -134,13 +139,14 @@ function table_getPinnedRows< } /** - * Returns top rows for the table. + * Resolves the visible rows pinned to the top region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The result follows `state.rowPinning.top` order and marks each row with + * `position = 'top'`. * * @example * ```ts - * const value = table_getTopRows(table) + * const rows = table_getTopRows(table) * ``` */ export function table_getTopRows< @@ -151,13 +157,14 @@ export function table_getTopRows< } /** - * Returns bottom rows for the table. + * Resolves the visible rows pinned to the bottom region. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The result follows `state.rowPinning.bottom` order and marks each row with + * `position = 'bottom'`. * * @example * ```ts - * const value = table_getBottomRows(table) + * const rows = table_getBottomRows(table) * ``` */ export function table_getBottomRows< @@ -168,13 +175,14 @@ export function table_getBottomRows< } /** - * Returns center rows for the table. + * Resolves rows that are not pinned to top or bottom. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The current row model is filtered by `state.rowPinning.top` and + * `state.rowPinning.bottom`. * * @example * ```ts - * const value = table_getCenterRows(table) + * const rows = table_getCenterRows(table) * ``` */ export function table_getCenterRows< @@ -192,13 +200,14 @@ export function table_getCenterRows< // Row Utils /** - * Returns whether a row can use pin. + * Checks whether this row can be pinned. * - * This evaluates row data, table options, and feature-specific enablement rules. + * `options.enableRowPinning` may be a boolean or a row predicate; it defaults + * to `true`. * * @example * ```ts - * const value = row_getCanPin(row) + * const canPin = row_getCanPin(row) * ``` */ export function row_getCanPin< @@ -213,13 +222,14 @@ export function row_getCanPin< } /** - * Returns is pinned for a row. + * Reads this row's current pinning region. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * Rows listed in `state.rowPinning.top` return `'top'`, rows listed in + * `bottom` return `'bottom'`, and unpinned rows return `false`. * * @example * ```ts - * const value = row_getIsPinned(row) + * const position = row_getIsPinned(row) * ``` */ export function row_getIsPinned< @@ -237,13 +247,13 @@ export function row_getIsPinned< } /** - * Returns pinned index for a row. + * Finds this row's visible index within its pinned region. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * Unpinned rows return `-1`. * * @example * ```ts - * const value = row_getPinnedIndex(row) + * const index = row_getPinnedIndex(row) * ``` */ export function row_getPinnedIndex< diff --git a/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts b/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts index ab23b79b69..00cc139d75 100644 --- a/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts +++ b/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts @@ -14,18 +14,22 @@ export interface TableOptions_RowSelection< TData extends RowData, > { /** - * - Enables/disables multiple row selection for all rows in the table OR - * - A function that given a row, returns whether to enable/disable multiple row selection for that row's children/grandchildren + * Allows rows to be selected alongside other rows. + * + * Provide a predicate to decide per row. Defaults to `true`. */ enableMultiRowSelection?: boolean | ((row: Row) => boolean) /** - * - Enables/disables row selection for all rows in the table OR - * - A function that given a row, returns whether to enable/disable row selection for that row + * Allows rows to be selected. + * + * Provide a predicate to decide per row. Defaults to `true`. */ enableRowSelection?: boolean | ((row: Row) => boolean) /** - * Enables/disables automatic sub-row selection when a parent row is selected, or a function that enables/disables automatic sub-row selection for each row. - * (Use in combination with expanding or grouping features) + * Controls whether selecting a parent row also selects its subRows. + * + * Provide a predicate to decide per row. This is most useful with expanding or + * grouping features and defaults to `true`. */ enableSubRowSelection?: boolean | ((row: Row) => boolean) /** @@ -49,31 +53,31 @@ export interface TableOptions_RowSelection< export interface Row_RowSelection { /** - * Returns whether or not the row can multi-select. + * Checks whether this row can be selected alongside other rows. */ getCanMultiSelect: () => boolean /** - * Returns whether or not the row can be selected. + * Checks whether this row can currently be selected. */ getCanSelect: () => boolean /** - * Returns whether or not the row can select sub rows automatically when the parent row is selected. + * Checks whether selecting this row should also select its subRows. */ getCanSelectSubRows: () => boolean /** - * Returns whether or not all of the row's sub rows are selected. + * Checks whether all selectable descendants are selected. */ getIsAllSubRowsSelected: () => boolean /** - * Returns whether or not the row is selected. + * Checks whether this row id is selected. */ getIsSelected: () => boolean /** - * Returns whether or not some of the row's sub rows are selected. + * Checks whether some selectable descendants are selected. */ getIsSomeSelected: () => boolean /** - * Returns a handler that can be used to toggle the row. + * Creates a checkbox-style handler that toggles this row's selected state. */ getToggleSelectedHandler: () => (event: unknown) => void /** @@ -87,27 +91,27 @@ export interface Table_RowSelection< TData extends RowData, > { /** - * Returns the row model of all rows that are selected after filtering has been applied. + * Builds a selected-row model from rows after filtering. */ getFilteredSelectedRowModel: () => RowModel /** - * Returns the row model of all rows that are selected after grouping has been applied. + * Builds a selected-row model from rows after grouping. */ getGroupedSelectedRowModel: () => RowModel /** - * Returns whether or not all rows on the current page are selected. + * Checks whether every selectable row on the current page is selected. */ getIsAllPageRowsSelected: () => boolean /** - * Returns whether or not all rows in the table are selected. + * Checks whether every selectable filtered row is selected. */ getIsAllRowsSelected: () => boolean /** - * Returns whether or not any rows on the current page are selected. + * Checks whether the current page has a partial row selection. */ getIsSomePageRowsSelected: () => boolean /** - * Returns whether or not any rows in the table are selected. + * Checks whether filtered rows have a partial row selection. */ getIsSomeRowsSelected: () => boolean /** @@ -115,23 +119,25 @@ export interface Table_RowSelection< */ getPreSelectedRowModel: () => RowModel /** - * Returns the row model of all rows that are selected. + * Builds a selected-row model from the core row model. */ getSelectedRowModel: () => RowModel /** - * Returns a handler that can be used to toggle all rows on the current page. + * Creates a checkbox-style handler that toggles all current-page rows. */ getToggleAllPageRowsSelectedHandler: () => (event: unknown) => void /** - * Returns a handler that can be used to toggle all rows in the table. + * Creates a checkbox-style handler that toggles all selectable rows. */ getToggleAllRowsSelectedHandler: () => (event: unknown) => void /** - * Resets the **rowSelection** state to the `initialState.rowSelection`, or `true` can be passed to force a default blank state reset to `{}`. + * Resets `rowSelection` to `initialState.rowSelection`. + * + * Pass `true` to ignore initial state and reset to `{}`. */ resetRowSelection: (defaultState?: boolean) => void /** - * Sets row selection state using a value or updater. + * Updates row selection state with a next map or updater function. */ setRowSelection: (updater: Updater) => void /** diff --git a/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts b/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts index 160ea74260..4062d2ea4e 100644 --- a/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts +++ b/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts @@ -9,13 +9,14 @@ import type { RowSelectionState } from './rowSelectionFeature.types' // State APIs /** - * Returns the default row selection state. + * Creates the default row selection state. * - * Feature constructors use this value to initialize the table state or option defaults when no user value is provided. + * The feature default is an empty map, meaning no rows are selected. Reset APIs + * use this value when `defaultState` is `true`. * * @example * ```ts - * const initialValue = getDefaultRowSelectionState() + * const selection = getDefaultRowSelectionState() * ``` */ export function getDefaultRowSelectionState(): RowSelectionState { @@ -23,13 +24,14 @@ export function getDefaultRowSelectionState(): RowSelectionState { } /** - * Updates the table's row selection state slice. + * Routes a row selection updater through the table's selection change handler. * - * The updater follows TanStack Table updater semantics and is routed through the corresponding `on*Change` option or backing atom. + * The updater may be a next selection map or a function of the previous map, + * matching the instance `table.setRowSelection` behavior. * * @example * ```ts - * table_setRowSelection(table, (old) => old) + * table_setRowSelection(table, (old) => ({ ...old, [rowId]: true })) * ``` */ export function table_setRowSelection< @@ -43,9 +45,10 @@ export function table_setRowSelection< } /** - * Resets the table's row selection state slice. + * Resets `rowSelection` to the configured initial state or feature default. * - * By default the reset uses `table.initialState`; when supported, a blank/default reset bypasses the saved initial value. + * With no argument, the reset clones `table.initialState.rowSelection` when it + * exists. Passing `true` ignores initial state and resets to `{}`. * * @example * ```ts @@ -66,9 +69,10 @@ export function table_resetRowSelection< // Table APIs /** - * Toggles all rows selected for the table. + * Selects or deselects every selectable row before grouping. * - * This is the table-level convenience API used by UI controls that affect many columns or rows at once. + * Omitting `value` toggles based on `table_getIsAllRowsSelected(table)`. + * Deselecting removes matching ids from the existing selection map. * * @example * ```ts @@ -107,9 +111,10 @@ export function table_toggleAllRowsSelected< } /** - * Toggles all page rows selected for the table. + * Selects or deselects every selectable row on the current page. * - * This is the table-level convenience API used by UI controls that affect many columns or rows at once. + * Omitting `value` toggles based on `table_getIsAllPageRowsSelected(table)`. + * Child rows are included when sub-row selection allows it. * * @example * ```ts @@ -137,13 +142,14 @@ export function table_toggleAllPageRowsSelected< } /** - * Returns pre selected row model for the table. + * Reads the row model before row selection is projected into selected rows. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Selection does not alter the base row pipeline, so this returns the core row + * model. * * @example * ```ts - * const value = table_getPreSelectedRowModel(table) + * const rowsBeforeSelection = table_getPreSelectedRowModel(table) * ``` */ export function table_getPreSelectedRowModel< @@ -154,13 +160,14 @@ export function table_getPreSelectedRowModel< } /** - * Returns selected row model for the table. + * Builds a row model containing selected rows from the core row model. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * If no row ids are selected, an empty row model is returned without walking + * the rows. * * @example * ```ts - * const value = table_getSelectedRowModel(table) + * const selectedRows = table_getSelectedRowModel(table) * ``` */ export function table_getSelectedRowModel< @@ -181,13 +188,14 @@ export function table_getSelectedRowModel< } /** - * Returns filtered selected row model for the table. + * Builds a row model containing selected rows from the filtered row model. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * If no row ids are selected, an empty row model is returned without walking + * the rows. * * @example * ```ts - * const value = table_getFilteredSelectedRowModel(table) + * const selectedRows = table_getFilteredSelectedRowModel(table) * ``` */ export function table_getFilteredSelectedRowModel< @@ -208,13 +216,14 @@ export function table_getFilteredSelectedRowModel< } /** - * Returns grouped selected row model for the table. + * Builds a row model containing selected rows from the grouped row model. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * If no row ids are selected, an empty row model is returned without walking + * the rows. * * @example * ```ts - * const value = table_getGroupedSelectedRowModel(table) + * const selectedRows = table_getGroupedSelectedRowModel(table) * ``` */ export function table_getGroupedSelectedRowModel< @@ -235,13 +244,14 @@ export function table_getGroupedSelectedRowModel< } /** - * Returns is all rows selected for the table. + * Checks whether every selectable filtered row is selected. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The result is false when there are no filtered rows or when selection state is + * empty. * * @example * ```ts - * const value = table_getIsAllRowsSelected(table) + * const allSelected = table_getIsAllRowsSelected(table) * ``` */ export function table_getIsAllRowsSelected< @@ -269,13 +279,13 @@ export function table_getIsAllRowsSelected< } /** - * Returns is all page rows selected for the table. + * Checks whether every selectable row on the current page is selected. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * Non-selectable rows are ignored for this calculation. * * @example * ```ts - * const value = table_getIsAllPageRowsSelected(table) + * const allPageRowsSelected = table_getIsAllPageRowsSelected(table) * ``` */ export function table_getIsAllPageRowsSelected< @@ -300,13 +310,14 @@ export function table_getIsAllPageRowsSelected< } /** - * Returns is some rows selected for the table. + * Checks whether selection is partially applied across filtered rows. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * The result is true when at least one row id is selected but fewer ids are + * selected than the current filtered flat row count. * * @example * ```ts - * const value = table_getIsSomeRowsSelected(table) + * const someRowsSelected = table_getIsSomeRowsSelected(table) * ``` */ export function table_getIsSomeRowsSelected< @@ -323,13 +334,14 @@ export function table_getIsSomeRowsSelected< } /** - * Returns is some page rows selected for the table. + * Checks whether the current page has a partial selection. * - * This reads the relevant table atoms, options, and row-model cache to derive the current table-level value. + * This is false when all selectable page rows are selected. Otherwise it is true + * if any selectable page row or descendant is selected. * * @example * ```ts - * const value = table_getIsSomePageRowsSelected(table) + * const somePageRowsSelected = table_getIsSomePageRowsSelected(table) * ``` */ export function table_getIsSomePageRowsSelected< @@ -345,13 +357,14 @@ export function table_getIsSomePageRowsSelected< } /** - * Returns an event handler for all rows selected handler. + * Creates a checkbox-style handler that selects or deselects all rows. * - * The handler calls the matching table toggle API and can be attached directly to checkbox or button UI. + * The handler reads `event.target.checked`, so it is intended for controls whose + * checked state means "all rows selected". * * @example * ```ts - * const value = table_getToggleAllRowsSelectedHandler(table) + * const onChange = table_getToggleAllRowsSelectedHandler(table) * ``` */ export function table_getToggleAllRowsSelectedHandler< @@ -367,13 +380,14 @@ export function table_getToggleAllRowsSelectedHandler< } /** - * Returns an event handler for all page rows selected handler. + * Creates a checkbox-style handler that selects or deselects current page rows. * - * The handler calls the matching table toggle API and can be attached directly to checkbox or button UI. + * The handler reads `event.target.checked`, so it is intended for controls whose + * checked state means "all page rows selected". * * @example * ```ts - * const value = table_getToggleAllPageRowsSelectedHandler(table) + * const onChange = table_getToggleAllPageRowsSelectedHandler(table) * ``` */ export function table_getToggleAllPageRowsSelectedHandler< @@ -391,9 +405,10 @@ export function table_getToggleAllPageRowsSelectedHandler< // Row APIs /** - * Toggles selected for a row. + * Selects or deselects this row. * - * The update is routed through the table state updater for the owning feature state slice. + * Omitting `value` toggles the row. Child rows are selected recursively unless + * `opts.selectChildren` is `false` or sub-row selection is disabled. * * @example * ```ts @@ -434,13 +449,13 @@ export function row_toggleSelected< } /** - * Returns is selected for a row. + * Checks whether this row id is selected in `state.rowSelection`. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * Missing row ids are treated as not selected. * * @example * ```ts - * const value = row_getIsSelected(row) + * const selected = row_getIsSelected(row) * ``` */ export function row_getIsSelected< @@ -451,13 +466,13 @@ export function row_getIsSelected< } /** - * Returns is some selected for a row. + * Checks whether some, but not all, selectable descendants are selected. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * This supports indeterminate selection UI for parent rows. * * @example * ```ts - * const value = row_getIsSomeSelected(row) + * const partial = row_getIsSomeSelected(row) * ``` */ export function row_getIsSomeSelected< @@ -468,13 +483,13 @@ export function row_getIsSomeSelected< } /** - * Returns is all sub rows selected for a row. + * Checks whether all selectable descendants are selected. * - * This is the static implementation behind the matching row instance API and may read row caches or table state atoms. + * Rows without selectable descendants return false. * * @example * ```ts - * const value = row_getIsAllSubRowsSelected(row) + * const allChildrenSelected = row_getIsAllSubRowsSelected(row) * ``` */ export function row_getIsAllSubRowsSelected< @@ -485,13 +500,14 @@ export function row_getIsAllSubRowsSelected< } /** - * Returns whether a row can use select. + * Checks whether this row can be selected. * - * This evaluates row data, table options, and feature-specific enablement rules. + * `options.enableRowSelection` may be a boolean or a row predicate; it defaults + * to `true`. * * @example * ```ts - * const value = row_getCanSelect(row) + * const canSelect = row_getCanSelect(row) * ``` */ export function row_getCanSelect< @@ -507,13 +523,14 @@ export function row_getCanSelect< } /** - * Returns whether a row can use select sub rows. + * Checks whether selecting this row should also select its subRows. * - * This evaluates row data, table options, and feature-specific enablement rules. + * `options.enableSubRowSelection` may be a boolean or a row predicate; it + * defaults to `true`. * * @example * ```ts - * const value = row_getCanSelectSubRows(row) + * const canSelectChildren = row_getCanSelectSubRows(row) * ``` */ export function row_getCanSelectSubRows< @@ -529,13 +546,14 @@ export function row_getCanSelectSubRows< } /** - * Returns whether a row can use multi select. + * Checks whether this row can be selected alongside other rows. * - * This evaluates row data, table options, and feature-specific enablement rules. + * `options.enableMultiRowSelection` may be a boolean or a row predicate; it + * defaults to `true`. * * @example * ```ts - * const value = row_getCanMultiSelect(row) + * const canMultiSelect = row_getCanMultiSelect(row) * ``` */ export function row_getCanMultiSelect< @@ -551,13 +569,14 @@ export function row_getCanMultiSelect< } /** - * Returns an event handler for toggling selected handler. + * Creates a checkbox-style handler that selects or deselects this row. * - * The handler is intended for direct use in row-level controls such as expansion or selection buttons. + * The handler is a no-op when the row cannot be selected and reads + * `event.target.checked`. * * @example * ```ts - * const value = row_getToggleSelectedHandler(row) + * const onChange = row_getToggleSelectedHandler(row) * ``` */ export function row_getToggleSelectedHandler< @@ -608,11 +627,12 @@ const mutateRowIsSelected = < /** * Builds a row model containing rows selected by the current row selection state. * - * The result is derived from the supplied row model, so selected ids absent from the current data are not materialized as rows. + * The result is derived from the supplied row model, so selected ids absent from + * that model are not materialized as rows. * * @example * ```ts - * const selectedRows = selectRowsFn(table, rowModel) + * const selectedRows = selectRowsFn(rowModel) * ``` */ export function selectRowsFn< @@ -663,7 +683,7 @@ export function selectRowsFn< * * @example * ```ts - * const selected = isRowSelected(row, selection) + * const selected = isRowSelected(row) * ``` */ export function isRowSelected< @@ -680,7 +700,7 @@ export function isRowSelected< * * @example * ```ts - * const selectedState = isSubRowSelected(row, selection, table) + * const selectedState = isSubRowSelected(row) * ``` */ export function isSubRowSelected< diff --git a/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts b/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts index 30b14a9d62..d46c3419ac 100644 --- a/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts +++ b/packages/table-core/src/features/row-sorting/rowSortingFeature.types.ts @@ -115,7 +115,7 @@ export interface Column_RowSorting< */ getFirstSortDir: () => SortDirection /** - * Returns the current sort direction of this column. + * Reads this column's current sort direction, or `false` when unsorted. */ getIsSorted: () => false | SortDirection /** @@ -123,7 +123,7 @@ export interface Column_RowSorting< */ getNextSortingOrder: () => SortDirection | false /** - * Returns the index position of this column's sorting within the sorting state + * Finds this column's position in the ordered sorting state. */ getSortIndex: () => number /** @@ -131,7 +131,7 @@ export interface Column_RowSorting< */ getSortFn: () => SortFn /** - * Returns a function that can be used to toggle this column's sorting state. This is useful for attaching a click handler to the column header. + * Creates a header/control handler that toggles this column's sorting state. */ getToggleSortingHandler: () => undefined | ((event: unknown) => void) /** @@ -142,7 +142,7 @@ export interface Column_RowSorting< export interface TableOptions_RowSorting { /** - * Enables/disables the ability to remove multi-sorts + * Allows multi-sort toggles to remove a column from sorting state. */ enableMultiRemove?: boolean /** @@ -188,11 +188,13 @@ export interface Table_RowSorting< TData extends RowData, > { /** - * Resets the **sorting** state to `initialState.sorting`, or `true` can be passed to force a default blank state reset to `[]`. + * Resets `sorting` to `initialState.sorting`. + * + * Pass `true` to ignore initial state and reset to `[]`. */ resetSorting: (defaultState?: boolean) => void /** - * Sets sorting state using a value or updater. + * Updates sorting state with a next ordered array or updater function. */ setSorting: (updater: Updater) => void } @@ -202,11 +204,11 @@ export interface Table_RowModels_Sorted< TData extends RowData, > { /** - * Returns the row model for the table before any sorting has been applied. + * Reads the row model immediately before sorting. */ getPreSortedRowModel: () => RowModel /** - * Returns the row model for the table after sorting has been applied. + * Resolves the row model after sorting has been applied. */ getSortedRowModel: () => RowModel } diff --git a/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts b/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts index 371438030e..03a2acab6e 100644 --- a/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts +++ b/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts @@ -390,7 +390,7 @@ export function column_getCanMultiSort< } /** - * Returns is sorted for a column. + * Reads this column's current sort direction. * * The result is `false` when the column is not sorted, otherwise `'asc'` or * `'desc'` based on the column's entry in `state.sorting`. diff --git a/packages/table-core/src/fns/aggregationFns.ts b/packages/table-core/src/fns/aggregationFns.ts index f7a435728d..e172e0098c 100755 --- a/packages/table-core/src/fns/aggregationFns.ts +++ b/packages/table-core/src/fns/aggregationFns.ts @@ -4,7 +4,10 @@ import type { Row } from '../types/Row' import type { AggregationFn } from '../features/column-grouping/columnGroupingFeature.types' /** - * Aggregation function for summing up the values of a column. + * Sums numeric child-row values for a grouped column. + * + * Non-number values contribute `0`. Child rows are used so nested group totals + * can reuse already aggregated values. */ export const aggregationFn_sum: AggregationFn = < TFeatures extends TableFeatures, @@ -23,7 +26,10 @@ export const aggregationFn_sum: AggregationFn = < } /** - * Aggregation function for finding the minimum value of a column. + * Finds the minimum numeric child-row value for a grouped column. + * + * Nullish and non-number values are ignored. Returns `undefined` when no + * numeric value is found. */ export const aggregationFn_min: AggregationFn = < TFeatures extends TableFeatures, @@ -51,7 +57,10 @@ export const aggregationFn_min: AggregationFn = < } /** - * Aggregation function for finding the maximum value of a column. + * Finds the maximum numeric child-row value for a grouped column. + * + * Nullish and non-number values are ignored. Returns `undefined` when no + * numeric value is found. */ export const aggregationFn_max: AggregationFn = < TFeatures extends TableFeatures, @@ -78,7 +87,10 @@ export const aggregationFn_max: AggregationFn = < } /** - * Aggregation function for finding the extent (min and max) of a column. + * Finds the numeric extent for a grouped column. + * + * Returns `[min, max]`, where each entry is `undefined` when no numeric value is + * present. */ export const aggregationFn_extent: AggregationFn = < TFeatures extends TableFeatures, @@ -107,7 +119,10 @@ export const aggregationFn_extent: AggregationFn = < } /** - * Aggregation function for finding the mean (average) of a column. + * Averages numeric leaf-row values for a grouped column. + * + * Number-like values are coerced with unary `+`; nullish and non-numeric values + * are ignored. */ export const aggregationFn_mean: AggregationFn = < TFeatures extends TableFeatures, @@ -139,7 +154,10 @@ export const aggregationFn_mean: AggregationFn = < } /** - * Aggregation function for finding the median value of a column. + * Computes the median of numeric leaf-row values for a grouped column. + * + * All values must be numbers. If any value is non-numeric, or no leaf rows are + * present, the result is `undefined`. */ export const aggregationFn_median: AggregationFn = < TFeatures extends TableFeatures, @@ -171,7 +189,9 @@ export const aggregationFn_median: AggregationFn = < } /** - * Aggregation function for finding the unique values of a column. + * Collects unique leaf-row values for a grouped column. + * + * Values are compared with JavaScript `Set` semantics. */ export const aggregationFn_unique: AggregationFn = < TFeatures extends TableFeatures, @@ -188,7 +208,9 @@ export const aggregationFn_unique: AggregationFn = < } /** - * Aggregation function for finding the count of unique values of a column. + * Counts unique leaf-row values for a grouped column. + * + * Values are compared with JavaScript `Set` semantics. */ export const aggregationFn_uniqueCount: AggregationFn = < TFeatures extends TableFeatures, @@ -205,7 +227,9 @@ export const aggregationFn_uniqueCount: AggregationFn = < } /** - * Aggregation function for counting the number of rows in a column. + * Counts the number of leaf rows in the group. + * + * The column id is ignored because the result is based only on group size. */ export const aggregationFn_count: AggregationFn = < TFeatures extends TableFeatures, diff --git a/packages/table-core/src/fns/filterFns.ts b/packages/table-core/src/fns/filterFns.ts index 96af3c1dc7..975e7f5e4d 100644 --- a/packages/table-core/src/fns/filterFns.ts +++ b/packages/table-core/src/fns/filterFns.ts @@ -6,7 +6,9 @@ import type { FilterFn } from '../features/column-filtering/columnFilteringFeatu // Basic filters /** - * Filter function for checking if a value is exactly equal to a given value. (JS === comparison) + * Keeps rows whose column value is strictly equal to the filter value. + * + * Uses JavaScript `===` comparison and auto-removes empty filter values. */ export const filterFn_equals: FilterFn = < TFeatures extends TableFeatures, @@ -22,7 +24,10 @@ export const filterFn_equals: FilterFn = < filterFn_equals.autoRemove = (val: any) => testFalsy(val) /** - * Filter function for checking if a value is weakly equal to a given value. (JS == comparison) + * Keeps rows whose column value is loosely equal to the filter value. + * + * Uses JavaScript `==` comparison and auto-removes empty filter values. This is + * useful for matching string input against numeric row values. */ export const filterFn_weakEquals: FilterFn = < TFeatures extends TableFeatures, @@ -40,7 +45,9 @@ filterFn_weakEquals.autoRemove = (val: any) => testFalsy(val) // String filters /** - * Filter function for checking if a string includes a given substring. (Case-sensitive) + * Keeps rows whose stringified column value includes the filter text. + * + * Matching is case-sensitive and empty filter values are auto-removed. */ export const filterFn_includesStringSensitive: FilterFn = < TFeatures extends TableFeatures, @@ -58,7 +65,10 @@ export const filterFn_includesStringSensitive: FilterFn = < filterFn_includesStringSensitive.autoRemove = (val: any) => testFalsy(val) /** - * Filter function for checking if a string includes a given substring. (Non-case-sensitive) + * Keeps rows whose stringified column value includes the filter text. + * + * Both values are lowercased before comparison, and empty filter values are + * auto-removed. */ export const filterFn_includesString: FilterFn = < TFeatures extends TableFeatures, @@ -80,7 +90,10 @@ export const filterFn_includesString: FilterFn = < filterFn_includesString.autoRemove = (val: any) => testFalsy(val) /** - * Filter function for checking if a string is exactly equal to a given string. (Non-case-sensitive) + * Keeps rows whose stringified column value equals the filter text. + * + * Both values are lowercased before comparison, and empty filter values are + * auto-removed. */ export const filterFn_equalsString: FilterFn = < TFeatures extends TableFeatures, @@ -99,7 +112,9 @@ export const filterFn_equalsString: FilterFn = < filterFn_equalsString.autoRemove = (val: any) => testFalsy(val) /** - * Filter function for checking if a string is exactly equal to a given string. (Case-sensitive) + * Keeps rows whose stringified column value exactly equals the filter text. + * + * Matching is case-sensitive and empty filter values are auto-removed. */ export const filterFn_equalsStringSensitive: FilterFn = < TFeatures extends TableFeatures, @@ -117,7 +132,10 @@ filterFn_equalsStringSensitive.autoRemove = (val: any) => testFalsy(val) // Number filters /** - * Filter function for checking if a number is greater than a given number. + * Keeps rows whose value is greater than the filter value. + * + * Numeric values are compared numerically when both sides can be coerced to + * numbers; otherwise normalized strings are compared. */ export const filterFn_greaterThan: FilterFn = < TFeatures extends TableFeatures, @@ -144,7 +162,9 @@ export const filterFn_greaterThan: FilterFn = < filterFn_greaterThan.resolveFilterValue = (val: any) => testFalsy(val) /** - * Filter function for checking if a number is greater than or equal to a given number. + * Keeps rows whose value is greater than or equal to the filter value. + * + * Delegates to the built-in greater-than and equality comparisons. */ export const filterFn_greaterThanOrEqualTo: FilterFn = < TFeatures extends TableFeatures, @@ -163,7 +183,9 @@ export const filterFn_greaterThanOrEqualTo: FilterFn = < filterFn_greaterThanOrEqualTo.resolveFilterValue = (val: any) => testFalsy(val) /** - * Filter function for checking if a number is less than a given number. + * Keeps rows whose value is less than the filter value. + * + * This is implemented as the inverse of greater-than-or-equal comparison. */ export const filterFn_lessThan: FilterFn = < TFeatures extends TableFeatures, @@ -179,7 +201,9 @@ export const filterFn_lessThan: FilterFn = < filterFn_lessThan.resolveFilterValue = (val: any) => testFalsy(val) /** - * Filter function for checking if a number is less than or equal to a given number. + * Keeps rows whose value is less than or equal to the filter value. + * + * This is implemented as the inverse of greater-than comparison. */ export const filterFn_lessThanOrEqualTo: FilterFn = < TFeatures extends TableFeatures, @@ -197,7 +221,9 @@ filterFn_lessThanOrEqualTo.resolveFilterValue = (val: any) => testFalsy(val) // Range filters /** - * Filter function for checking if a number or a string is between two given values. + * Keeps rows whose value falls between an exclusive min/max pair. + * + * Blank range endpoints are treated as open-ended. */ const filterFn_between: FilterFn = < TFeatures extends TableFeatures, @@ -218,7 +244,9 @@ const filterFn_between: FilterFn = < filterFn_between.autoRemove = (val: any) => !val /** - * Filter function for checking if a number or a string is between two given values or equal to them. + * Keeps rows whose value falls between an inclusive min/max pair. + * + * Blank range endpoints are treated as open-ended. */ const filterFn_betweenInclusive: FilterFn = < TFeatures extends TableFeatures, @@ -239,7 +267,10 @@ const filterFn_betweenInclusive: FilterFn = < filterFn_betweenInclusive.autoRemove = (val: any) => !val /** - * Filter function for checking if a number is within a given range. + * Keeps rows whose numeric value is inside an inclusive `[min, max]` range. + * + * Filter values are normalized so blank endpoints become open-ended and + * reversed endpoints are swapped. */ export const filterFn_inNumberRange: FilterFn = < TFeatures extends TableFeatures, @@ -282,7 +313,7 @@ filterFn_inNumberRange.autoRemove = (val: any) => // Array filters /** - * Filter function for checking if an array has a given value. + * Keeps rows whose scalar column value equals at least one filter value. */ export const filterFn_arrHas: FilterFn = < TFeatures extends TableFeatures, @@ -296,7 +327,7 @@ export const filterFn_arrHas: FilterFn = < } /** - * Filter function for checking if an array includes a given value. + * Keeps rows whose array or string column value includes at least one filter value. */ export const filterFn_arrIncludes: FilterFn = < TFeatures extends TableFeatures, @@ -316,7 +347,7 @@ export const filterFn_arrIncludes: FilterFn = < filterFn_arrIncludes.autoRemove = (val: any) => testFalsy(val) || !val?.length /** - * Filter function for checking if an array includes all of the given values. + * Keeps rows whose array column value includes every filter value. */ export const filterFn_arrIncludesAll: FilterFn = < TFeatures extends TableFeatures, @@ -335,7 +366,7 @@ filterFn_arrIncludesAll.autoRemove = (val: any) => testFalsy(val) || !val?.length /** - * Filter function for checking if an array includes any of the given values. + * Keeps rows whose array column value includes at least one filter value. */ export const filterFn_arrIncludesSome: FilterFn = < TFeatures extends TableFeatures, diff --git a/packages/table-core/src/helpers/columnHelper.ts b/packages/table-core/src/helpers/columnHelper.ts index 9de7d64107..edfd57e15b 100644 --- a/packages/table-core/src/helpers/columnHelper.ts +++ b/packages/table-core/src/helpers/columnHelper.ts @@ -78,16 +78,21 @@ export type ColumnHelper< } /** - * A helper utility for creating column definitions with slightly better type inference for each individual column. - * The `TValue` generic is inferred based on the accessor key or function provided. - * **Note:** From a JavaScript perspective, the functions in these helpers do not do anything. They are only used to help TypeScript infer the correct types for the column definitions. + * Creates helper functions for authoring column definitions with stronger value + * inference. + * + * `accessor` infers `TValue` from an accessor key or accessor function, + * `display` creates non-data columns, `group` creates parent columns, and + * `columns` preserves tuple-level value types for arrays. At runtime these + * helpers only return column definition objects. + * * @example * ```tsx * const helper = createColumnHelper() // _features is the result of `tableFeatures({})` helper * const columns = [ * helper.display({ id: 'actions', header: 'Actions' }), * helper.accessor('firstName', {}), - * helper.accessor((row) => row.lastName, {} + * helper.accessor((row) => row.lastName, { id: 'lastName' }), * ] * ``` */ diff --git a/packages/table-core/src/helpers/tableOptions.ts b/packages/table-core/src/helpers/tableOptions.ts index 787dcf64f1..df727fc607 100644 --- a/packages/table-core/src/helpers/tableOptions.ts +++ b/packages/table-core/src/helpers/tableOptions.ts @@ -3,9 +3,10 @@ import type { TableFeatures } from '../types/TableFeatures' import type { TableOptions } from '../types/TableOptions' /** - * Returns table options while preserving generic inference. + * Preserves table option inference when reusable options omit `columns`. * - * This helper is useful when composing reusable table options outside of a framework adapter call. + * This is useful for composing shared options that will receive columns later + * from a framework adapter or table factory. */ export function tableOptions< TFeatures extends TableFeatures, @@ -19,7 +20,7 @@ export function tableOptions< } /** - * Returns table options while preserving generic inference when `data` is supplied later. + * Preserves table option inference when reusable options omit `data`. */ export function tableOptions< TFeatures extends TableFeatures, @@ -33,7 +34,8 @@ export function tableOptions< } /** - * Returns table options while preserving generic inference when both `data` and `columns` are supplied later. + * Preserves table option inference when reusable options omit both `data` and + * `columns`. */ export function tableOptions< TFeatures extends TableFeatures, @@ -47,7 +49,7 @@ export function tableOptions< } /** - * Returns a fully specified table options object without changing its runtime value. + * Preserves inference for a fully specified table options object. */ export function tableOptions< TFeatures extends TableFeatures, @@ -55,7 +57,7 @@ export function tableOptions< >(options: TableOptions): TableOptions /** - * Returns table options while preserving generic inference when `_features` is supplied by a wrapper. + * Preserves inference when a wrapper supplies `_features`. */ export function tableOptions< TFeatures extends TableFeatures, @@ -65,7 +67,7 @@ export function tableOptions< ): Omit, '_features'> /** - * Returns table options while preserving generic inference when `data` and `_features` are supplied by a wrapper. + * Preserves inference when a wrapper supplies both `data` and `_features`. */ export function tableOptions< TFeatures extends TableFeatures, @@ -75,7 +77,7 @@ export function tableOptions< ): Omit, 'data' | '_features'> /** - * Returns table options while preserving generic inference when `columns` and `_features` are supplied by a wrapper. + * Preserves inference when a wrapper supplies both `columns` and `_features`. */ export function tableOptions< TFeatures extends TableFeatures, @@ -85,7 +87,8 @@ export function tableOptions< ): Omit, 'columns' | '_features'> /** - * Returns table options while preserving generic inference when `data`, `columns`, and `_features` are supplied by a wrapper. + * Preserves inference when a wrapper supplies `data`, `columns`, and + * `_features`. */ export function tableOptions< TFeatures extends TableFeatures, diff --git a/packages/table-core/src/types/ColumnDef.ts b/packages/table-core/src/types/ColumnDef.ts index de0456d6a4..b60ddc0173 100644 --- a/packages/table-core/src/types/ColumnDef.ts +++ b/packages/table-core/src/types/ColumnDef.ts @@ -27,11 +27,23 @@ export interface ColumnMeta< TValue extends CellData = CellData, > {} +/** + * Reads a cell value from an original row object. + * + * The row index is provided for accessors that need stable position-aware + * derived values. + */ export type AccessorFn< TData extends RowData, TValue extends CellData = CellData, > = (originalRow: TData, index: number) => TValue +/** + * A renderable column template value. + * + * Strings render directly; functions receive the relevant cell/header context + * and can return framework-specific render output. + */ export type ColumnDefTemplate = | string | ((props: TProps) => any) @@ -43,7 +55,13 @@ export type StringOrTemplateHeader< > = string | ColumnDefTemplate> export interface StringHeaderIdentifier { + /** + * Header text used both for rendering and as a fallback column id. + */ header: string + /** + * Optional explicit id that overrides the header-derived id. + */ id?: string } @@ -52,7 +70,13 @@ export interface IdIdentifier< TData extends RowData, TValue extends CellData = CellData, > { + /** + * Explicit stable column id. + */ id: string + /** + * Header text or template used to render this column's header. + */ header?: StringOrTemplateHeader } type ColumnIdentifiers< @@ -66,9 +90,23 @@ interface ColumnDefBase_Core< TData extends RowData, TValue extends CellData = CellData, > { + /** + * Produces the values used by faceting/grouping for this column. + * + * When omitted, the normal accessor value is wrapped in a single-item array. + */ getUniqueValues?: AccessorFn> + /** + * Footer template rendered with header context. + */ footer?: ColumnDefTemplate> + /** + * Cell template rendered with cell context. + */ cell?: ColumnDefTemplate> + /** + * User-defined metadata available on the resolved column definition. + */ meta?: ColumnMeta } diff --git a/packages/table-core/src/types/TableOptions.ts b/packages/table-core/src/types/TableOptions.ts index 2a3567be10..67f46dbe4f 100644 --- a/packages/table-core/src/types/TableOptions.ts +++ b/packages/table-core/src/types/TableOptions.ts @@ -24,6 +24,10 @@ export interface TableOptions_Plugins< TData extends RowData, > {} +/** + * Core options that are always available on a table, before optional feature + * options are mixed in. + */ export interface TableOptions_Core< TFeatures extends TableFeatures, TData extends RowData, @@ -48,6 +52,13 @@ export type DebugOptions = { debugTable?: boolean } & DebugKeysFor +/** + * Complete table options for a specific feature set. + * + * Feature options are included only when their feature is present in + * `TFeatures`, then custom feature/plugin options and debug options are mixed + * in. + */ export type TableOptions< TFeatures extends TableFeatures, TData extends RowData, @@ -104,6 +115,10 @@ export type TableOptions< // ExtractFeatureTypes<'TableOptions', TFeatures> & // TableOptions_Plugins +/** + * Internal broad option shape used where feature code may need to read options + * from features that are not present in the current generic feature set. + */ export type TableOptions_All< TFeatures extends TableFeatures, TData extends RowData, diff --git a/packages/table-core/src/types/TableState.ts b/packages/table-core/src/types/TableState.ts index e90d550f62..98a3972693 100644 --- a/packages/table-core/src/types/TableState.ts +++ b/packages/table-core/src/types/TableState.ts @@ -20,6 +20,12 @@ import type { ExtractFeatureTypes, TableFeatures } from './TableFeatures' */ export interface TableState_Plugins {} +/** + * Complete table state for a specific feature set. + * + * State slices are included only when their feature is present in `TFeatures`, + * then custom feature/plugin state is mixed in. + */ export type TableState = UnionToIntersection< | ('columnFilteringFeature' extends keyof TFeatures ? TableState_ColumnFiltering @@ -71,6 +77,12 @@ export type TableState = UnionToIntersection< // > & // TableState_Plugins +/** + * Internal broad state shape containing every stock feature state slice. + * + * Feature internals use this when they may need to inspect optional slices owned + * by other features. + */ export type TableState_All = Partial< TableState_ColumnFiltering & TableState_ColumnGrouping &