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 &