From 725343ecc30cdd3c119d9dcacb41a4330097b6f7 Mon Sep 17 00:00:00 2001 From: Kevin Van Cott Date: Mon, 20 Apr 2026 19:52:24 -0500 Subject: [PATCH 1/7] feat: refactor table store into feature atoms --- docs/config.json | 39 +- .../functions/assignPrototypeAPIs.md | 2 +- docs/reference/functions/assignTableAPIs.md | 2 +- .../reference/functions/callMemoOrStaticFn.md | 2 +- docs/reference/functions/cell_getContext.md | 80 -- .../functions/cell_getIsAggregated.md | 36 - docs/reference/functions/cell_getIsGrouped.md | 36 - .../functions/cell_getIsPlaceholder.md | 36 - docs/reference/functions/cell_getValue.md | 36 - docs/reference/functions/cell_renderValue.md | 36 - .../functions/column_clearSorting.md | 36 - docs/reference/functions/column_getAfter.md | 40 - .../functions/column_getAggregationFn.md | 39 - .../functions/column_getAutoAggregationFn.md | 39 - .../functions/column_getAutoFilterFn.md | 39 - .../functions/column_getAutoSortDir.md | 36 - .../functions/column_getAutoSortFn.md | 36 - .../functions/column_getCanFilter.md | 36 - .../functions/column_getCanGlobalFilter.md | 36 - .../reference/functions/column_getCanGroup.md | 36 - docs/reference/functions/column_getCanHide.md | 36 - .../functions/column_getCanMultiSort.md | 36 - docs/reference/functions/column_getCanPin.md | 36 - .../functions/column_getCanResize.md | 36 - docs/reference/functions/column_getCanSort.md | 36 - .../column_getFacetedMinMaxValues.md | 40 - .../functions/column_getFacetedRowModel.md | 40 - .../column_getFacetedUniqueValues.md | 40 - .../reference/functions/column_getFilterFn.md | 39 - .../functions/column_getFilterIndex.md | 36 - .../functions/column_getFilterValue.md | 36 - .../functions/column_getFirstSortDir.md | 36 - .../functions/column_getFlatColumns.md | 36 - .../functions/column_getGroupedIndex.md | 36 - docs/reference/functions/column_getIndex.md | 40 - .../functions/column_getIsFiltered.md | 36 - .../functions/column_getIsFirstColumn.md | 40 - .../functions/column_getIsGrouped.md | 36 - .../functions/column_getIsLastColumn.md | 40 - .../reference/functions/column_getIsPinned.md | 36 - .../functions/column_getIsResizing.md | 36 - .../reference/functions/column_getIsSorted.md | 36 - .../functions/column_getIsVisible.md | 36 - .../functions/column_getLeafColumns.md | 36 - .../functions/column_getNextSortingOrder.md | 40 - .../functions/column_getPinnedIndex.md | 36 - docs/reference/functions/column_getSize.md | 36 - docs/reference/functions/column_getSortFn.md | 36 - .../functions/column_getSortIndex.md | 36 - docs/reference/functions/column_getStart.md | 40 - .../column_getToggleGroupingHandler.md | 42 - .../column_getToggleSortingHandler.md | 48 -- .../column_getToggleVisibilityHandler.md | 48 -- docs/reference/functions/column_pin.md | 40 - docs/reference/functions/column_resetSize.md | 36 - .../functions/column_setFilterValue.md | 40 - .../functions/column_toggleGrouping.md | 36 - .../functions/column_toggleSorting.md | 47 - .../functions/column_toggleVisibility.md | 40 - docs/reference/functions/constructTable.md | 2 +- docs/reference/functions/createTableStore.md | 32 - docs/reference/functions/flattenBy.md | 2 +- .../functions/getDefaultColumnFiltersState.md | 16 - .../functions/getDefaultColumnOrderState.md | 16 - .../functions/getDefaultColumnPinningState.md | 16 - .../getDefaultColumnResizingState.md | 16 - .../getDefaultColumnSizingColumnDef.md | 34 - .../functions/getDefaultColumnSizingState.md | 16 - .../getDefaultColumnVisibilityState.md | 16 - .../functions/getDefaultExpandedState.md | 16 - .../functions/getDefaultGroupingState.md | 16 - .../functions/getDefaultPaginationState.md | 16 - .../functions/getDefaultRowPinningState.md | 16 - .../functions/getDefaultRowSelectionState.md | 16 - .../functions/getDefaultSortingState.md | 16 - .../functions/getFunctionNameInfo.md | 2 +- docs/reference/functions/getMemoFnMeta.md | 2 +- docs/reference/functions/header_getContext.md | 54 -- .../functions/header_getLeafHeaders.md | 36 - .../functions/header_getResizeHandler.md | 52 -- docs/reference/functions/header_getSize.md | 36 - docs/reference/functions/header_getStart.md | 36 - docs/reference/functions/isFunction.md | 2 +- docs/reference/functions/isNumberArray.md | 2 +- docs/reference/functions/isRowSelected.md | 32 - docs/reference/functions/isSubRowSelected.md | 32 - docs/reference/functions/isTouchStartEvent.md | 22 - docs/reference/functions/memo.md | 2 +- docs/reference/functions/orderColumns.md | 36 - .../functions/passiveEventSupported.md | 16 - docs/reference/functions/row_getAllCells.md | 32 - .../functions/row_getAllCellsByColumnId.md | 32 - .../functions/row_getAllVisibleCells.md | 32 - docs/reference/functions/row_getCanExpand.md | 32 - .../functions/row_getCanMultiSelect.md | 32 - docs/reference/functions/row_getCanPin.md | 32 - docs/reference/functions/row_getCanSelect.md | 32 - .../functions/row_getCanSelectSubRows.md | 32 - .../functions/row_getCenterVisibleCells.md | 32 - .../functions/row_getGroupingValue.md | 43 - .../functions/row_getIsAllParentsExpanded.md | 32 - .../functions/row_getIsAllSubRowsSelected.md | 32 - docs/reference/functions/row_getIsExpanded.md | 32 - docs/reference/functions/row_getIsGrouped.md | 39 - docs/reference/functions/row_getIsPinned.md | 32 - docs/reference/functions/row_getIsSelected.md | 32 - .../functions/row_getIsSomeSelected.md | 32 - docs/reference/functions/row_getLeafRows.md | 32 - .../functions/row_getLeftVisibleCells.md | 32 - docs/reference/functions/row_getParentRow.md | 32 - docs/reference/functions/row_getParentRows.md | 32 - .../reference/functions/row_getPinnedIndex.md | 32 - .../functions/row_getRightVisibleCells.md | 32 - .../functions/row_getToggleExpandedHandler.md | 38 - .../functions/row_getToggleSelectedHandler.md | 44 - .../functions/row_getUniqueValues.md | 36 - docs/reference/functions/row_getValue.md | 36 - .../functions/row_getVisibleCells.md | 43 - docs/reference/functions/row_pin.md | 48 -- docs/reference/functions/row_renderValue.md | 36 - .../reference/functions/row_toggleExpanded.md | 36 - .../reference/functions/row_toggleSelected.md | 45 - docs/reference/functions/selectRowsFn.md | 32 - .../functions/shouldAutoRemoveFilter.md | 47 - docs/reference/functions/tableMemo.md | 2 +- .../functions/table_autoResetExpanded.md | 32 - .../functions/table_autoResetPageIndex.md | 32 - docs/reference/functions/table_firstPage.md | 32 - .../functions/table_getAllColumns.md | 32 - .../functions/table_getAllFlatColumns.md | 32 - .../functions/table_getAllFlatColumnsById.md | 32 - .../functions/table_getAllLeafColumns.md | 32 - .../functions/table_getBottomRows.md | 32 - .../functions/table_getCanNextPage.md | 32 - .../functions/table_getCanPreviousPage.md | 32 - .../functions/table_getCanSomeRowsExpand.md | 32 - .../functions/table_getCenterFlatHeaders.md | 32 - .../functions/table_getCenterFooterGroups.md | 32 - .../functions/table_getCenterHeaderGroups.md | 32 - .../functions/table_getCenterLeafColumns.md | 32 - .../functions/table_getCenterLeafHeaders.md | 32 - .../functions/table_getCenterRows.md | 32 - .../functions/table_getCenterTotalSize.md | 32 - .../table_getCenterVisibleLeafColumns.md | 32 - docs/reference/functions/table_getColumn.md | 39 - .../functions/table_getCoreRowModel.md | 32 - .../functions/table_getDefaultColumnDef.md | 32 - .../functions/table_getExpandedDepth.md | 32 - .../functions/table_getExpandedRowModel.md | 32 - .../functions/table_getFilteredRowModel.md | 32 - .../table_getFilteredSelectedRowModel.md | 32 - .../functions/table_getFlatHeaders.md | 32 - .../functions/table_getFooterGroups.md | 32 - .../functions/table_getGlobalAutoFilterFn.md | 16 - .../table_getGlobalFacetedMinMaxValues.md | 32 - .../table_getGlobalFacetedRowModel.md | 32 - .../table_getGlobalFacetedUniqueValues.md | 32 - .../functions/table_getGlobalFilterFn.md | 35 - .../functions/table_getGroupedRowModel.md | 32 - .../table_getGroupedSelectedRowModel.md | 32 - .../functions/table_getHeaderGroups.md | 32 - .../functions/table_getIsAllColumnsVisible.md | 32 - .../table_getIsAllPageRowsSelected.md | 32 - .../functions/table_getIsAllRowsExpanded.md | 32 - .../functions/table_getIsAllRowsSelected.md | 32 - .../functions/table_getIsSomeColumnsPinned.md | 36 - .../table_getIsSomeColumnsVisible.md | 32 - .../table_getIsSomePageRowsSelected.md | 32 - .../functions/table_getIsSomeRowsExpanded.md | 32 - .../functions/table_getIsSomeRowsPinned.md | 36 - .../functions/table_getIsSomeRowsSelected.md | 32 - .../functions/table_getLeafHeaders.md | 32 - .../functions/table_getLeftFlatHeaders.md | 32 - .../functions/table_getLeftFooterGroups.md | 32 - .../functions/table_getLeftHeaderGroups.md | 32 - .../functions/table_getLeftLeafColumns.md | 32 - .../functions/table_getLeftLeafHeaders.md | 32 - .../functions/table_getLeftTotalSize.md | 32 - .../table_getLeftVisibleLeafColumns.md | 32 - .../functions/table_getOrderColumnsFn.md | 44 - .../reference/functions/table_getPageCount.md | 32 - .../functions/table_getPageOptions.md | 32 - .../functions/table_getPaginatedRowModel.md | 32 - .../functions/table_getPinnedLeafColumns.md | 36 - .../table_getPinnedVisibleLeafColumns.md | 36 - .../functions/table_getPreExpandedRowModel.md | 32 - .../functions/table_getPreFilteredRowModel.md | 32 - .../functions/table_getPreGroupedRowModel.md | 32 - .../table_getPrePaginatedRowModel.md | 32 - .../functions/table_getPreSelectedRowModel.md | 32 - .../functions/table_getPreSortedRowModel.md | 32 - .../functions/table_getRightFlatHeaders.md | 32 - .../functions/table_getRightFooterGroups.md | 32 - .../functions/table_getRightHeaderGroups.md | 32 - .../functions/table_getRightLeafColumns.md | 32 - .../functions/table_getRightLeafHeaders.md | 32 - .../functions/table_getRightTotalSize.md | 32 - .../table_getRightVisibleLeafColumns.md | 32 - docs/reference/functions/table_getRow.md | 43 - docs/reference/functions/table_getRowCount.md | 32 - docs/reference/functions/table_getRowId.md | 48 -- docs/reference/functions/table_getRowModel.md | 32 - .../functions/table_getSelectedRowModel.md | 32 - .../functions/table_getSortedRowModel.md | 32 - ...le_getToggleAllColumnsVisibilityHandler.md | 44 - ...ble_getToggleAllPageRowsSelectedHandler.md | 44 - .../table_getToggleAllRowsExpandedHandler.md | 44 - .../table_getToggleAllRowsSelectedHandler.md | 44 - docs/reference/functions/table_getTopRows.md | 32 - .../reference/functions/table_getTotalSize.md | 32 - .../functions/table_getVisibleFlatColumns.md | 32 - .../functions/table_getVisibleLeafColumns.md | 32 - docs/reference/functions/table_lastPage.md | 32 - .../reference/functions/table_mergeOptions.md | 36 - docs/reference/functions/table_nextPage.md | 32 - .../reference/functions/table_previousPage.md | 32 - docs/reference/functions/table_reset.md | 32 - .../functions/table_resetColumnFilters.md | 36 - .../functions/table_resetColumnOrder.md | 36 - .../functions/table_resetColumnPinning.md | 36 - .../functions/table_resetColumnSizing.md | 36 - .../functions/table_resetColumnVisibility.md | 36 - .../functions/table_resetExpanded.md | 36 - .../functions/table_resetGlobalFilter.md | 36 - .../functions/table_resetGrouping.md | 36 - .../functions/table_resetHeaderSizeInfo.md | 36 - .../functions/table_resetPageIndex.md | 36 - .../functions/table_resetPageSize.md | 36 - .../functions/table_resetPagination.md | 36 - .../functions/table_resetRowPinning.md | 36 - .../functions/table_resetRowSelection.md | 36 - .../reference/functions/table_resetSorting.md | 36 - .../functions/table_setColumnFilters.md | 36 - .../functions/table_setColumnOrder.md | 36 - .../functions/table_setColumnPinning.md | 36 - .../functions/table_setColumnResizing.md | 36 - .../functions/table_setColumnSizing.md | 36 - .../functions/table_setColumnVisibility.md | 36 - docs/reference/functions/table_setExpanded.md | 36 - .../functions/table_setGlobalFilter.md | 36 - docs/reference/functions/table_setGrouping.md | 36 - docs/reference/functions/table_setOptions.md | 36 - .../reference/functions/table_setPageIndex.md | 36 - docs/reference/functions/table_setPageSize.md | 36 - .../functions/table_setPagination.md | 36 - .../functions/table_setRowPinning.md | 36 - .../functions/table_setRowSelection.md | 36 - docs/reference/functions/table_setSorting.md | 36 - .../table_toggleAllColumnsVisible.md | 36 - .../table_toggleAllPageRowsSelected.md | 36 - .../functions/table_toggleAllRowsExpanded.md | 36 - .../functions/table_toggleAllRowsSelected.md | 36 - docs/reference/index.md | 246 +----- docs/reference/interfaces/API.md | 6 +- docs/reference/interfaces/PrototypeAPI.md | 6 +- .../reference/interfaces/TableOptions_Core.md | 52 +- .../interfaces/TableOptions_Table.md | 46 +- .../interfaces/Table_CoreProperties.md | 50 +- docs/reference/interfaces/Table_Plugins.md | 2 +- docs/reference/interfaces/Table_Table.md | 60 +- docs/reference/type-aliases/APIObject.md | 2 +- docs/reference/type-aliases/Atoms.md | 24 + docs/reference/type-aliases/Atoms_All.md | 12 + docs/reference/type-aliases/BaseAtoms.md | 21 + docs/reference/type-aliases/BaseAtoms_All.md | 20 + docs/reference/type-aliases/ExternalAtoms.md | 22 + .../type-aliases/ExternalAtoms_All.md | 12 + docs/reference/type-aliases/MemoFnMeta.md | 4 +- .../type-aliases/PrototypeAPIObject.md | 2 +- .../type-aliases/RowSelectionState.md | 2 +- docs/reference/type-aliases/Table.md | 2 +- docs/reference/type-aliases/Table_Core.md | 2 +- docs/reference/type-aliases/Table_Internal.md | 18 +- .../variables/$internalMemoFnMeta.md | 2 +- .../angular/basic-inject-table/src/app/app.ts | 1 + examples/angular/grouping/src/app/app.ts | 1 + examples/angular/remote-data/src/app/app.ts | 1 + examples/angular/row-selection/src/app/app.ts | 1 + .../angular/sub-components/src/app/app.ts | 1 + examples/lit/basic-app-table/src/main.ts | 1 + .../index.html | 0 .../package.json | 3 +- .../src/main.ts | 73 +- .../src/makeData.ts | 0 .../tsconfig.json | 0 .../vite.config.js | 0 .../src/components/products-table.ts | 1 + .../index.html | 0 .../package.json | 3 +- .../src/index.css | 0 .../src/main.tsx | 46 +- .../src/makeData.ts | 0 .../src/vite-env.d.ts | 0 .../tsconfig.json | 0 .../vite.config.ts | 0 .../preact/basic-external-state/package.json | 1 + .../preact/basic-external-state/src/main.tsx | 1 + .../preact/basic-use-app-table/package.json | 1 + .../preact/basic-use-app-table/src/main.tsx | 1 + .../{basic => basic-use-table}/.gitignore | 0 .../{basic => basic-use-table}/README.md | 0 .../{basic => basic-use-table}/index.html | 0 .../{basic => basic-use-table}/package.json | 1 + .../public/vite.svg | 0 .../{basic => basic-use-table}/src/index.css | 0 .../{basic => basic-use-table}/src/main.tsx | 1 + .../src/vite-env.d.ts | 0 .../{basic => basic-use-table}/tsconfig.json | 0 .../{basic => basic-use-table}/vite.config.ts | 0 examples/preact/column-groups/package.json | 1 + examples/preact/column-groups/src/main.tsx | 1 + examples/preact/column-ordering/package.json | 1 + .../preact/column-pinning-split/package.json | 1 + .../preact/column-pinning-sticky/package.json | 1 + examples/preact/column-pinning/package.json | 1 + examples/preact/column-pinning/src/main.tsx | 1 + .../column-resizing-performant/package.json | 1 + examples/preact/column-resizing/package.json | 1 + examples/preact/column-sizing/package.json | 1 + .../preact/column-visibility/package.json | 1 + .../preact/composable-tables/package.json | 1 + .../preact/composable-tables/src/main.tsx | 1 + examples/preact/custom-plugin/package.json | 1 + examples/preact/expanding/package.json | 1 + examples/preact/filters-faceted/package.json | 1 + examples/preact/filters-fuzzy/package.json | 1 + examples/preact/filters/package.json | 1 + examples/preact/grouping/package.json | 1 + examples/preact/pagination/package.json | 1 + examples/preact/row-pinning/package.json | 1 + examples/preact/row-pinning/src/main.tsx | 1 + examples/preact/row-selection/package.json | 1 + examples/preact/sorting/package.json | 1 + examples/preact/sub-components/package.json | 1 + examples/preact/sub-components/src/main.tsx | 1 + .../preact/with-tanstack-query/package.json | 1 + .../preact/with-tanstack-query/src/main.tsx | 34 +- .../.gitignore | 0 .../README.md | 0 .../index.html | 0 .../package.json | 2 +- .../src/index.css | 0 .../src/main.tsx | 47 +- .../src/makeData.ts | 0 .../src/vite-env.d.ts | 0 .../tsconfig.json | 0 .../vite.config.js | 0 .../react/basic-external-state/src/main.tsx | 1 + examples/react/basic-shadcn/src/main.tsx | 1 + .../react/basic-use-app-table/src/main.tsx | 1 + examples/react/basic-use-table/src/main.tsx | 1 + examples/react/column-dnd/src/main.tsx | 1 + examples/react/column-groups/src/main.tsx | 1 + examples/react/column-pinning/src/main.tsx | 1 + examples/react/composable-tables/src/main.tsx | 1 + examples/react/row-dnd/src/main.tsx | 1 + examples/react/row-pinning/src/main.tsx | 1 + examples/react/row-selection/src/main.tsx | 8 +- examples/react/sub-components/src/main.tsx | 1 + .../react/with-tanstack-query/src/main.tsx | 34 +- .../src/components/table.tsx | 10 +- examples/solid/basic-app-table/src/App.tsx | 1 + .../.gitignore | 0 .../README.md | 0 .../index.html | 0 .../package.json | 3 +- .../src/App.tsx | 64 +- .../src/index.css | 0 .../src/index.tsx | 0 .../src/makeData.ts | 0 .../tsconfig.json | 0 .../vite.config.ts | 0 .../solid/basic-external-state/src/App.tsx | 1 + examples/solid/basic-use-table/src/App.tsx | 1 + examples/solid/column-groups/src/App.tsx | 1 + examples/solid/column-ordering/src/App.tsx | 1 + examples/solid/column-pinning/src/App.tsx | 1 + examples/solid/column-visibility/src/App.tsx | 1 + examples/solid/composable-tables/src/App.tsx | 1 + examples/solid/row-pinning/src/App.tsx | 1 + examples/solid/sub-components/src/App.tsx | 1 + .../src/App.tsx | 24 +- .../solid/with-tanstack-query/src/App.tsx | 32 +- .../src/components/table.tsx | 1 + .../svelte/basic-app-table/src/App.svelte | 1 + .../svelte/basic-create-table/src/App.svelte | 1 + .../index.html | 0 .../package.json | 5 +- .../src/App.svelte | 62 +- .../src/index.css | 0 .../src/main.ts | 0 .../src/makeData.ts | 0 .../src/vite-env.d.ts | 0 .../svelte.config.js | 0 .../tsconfig.json | 0 .../vite.config.js | 0 .../basic-external-state/src/App.svelte | 1 + examples/svelte/basic-snippets/src/App.svelte | 1 + examples/svelte/column-groups/src/App.svelte | 1 + .../src/components/ProductsTable.svelte | 1 + examples/svelte/row-pinning/src/App.svelte | 1 + examples/svelte/sub-components/src/App.svelte | 1 + examples/vanilla/basic/src/main.ts | 1 + .../{basic => basic-external-atoms}/README.md | 0 .../{basic => basic-external-atoms}/env.d.ts | 0 .../index.html | 0 .../vue/basic-external-atoms/package.json | 26 + examples/vue/basic-external-atoms/src/App.tsx | 210 +++++ examples/vue/basic-external-atoms/src/App.vue | 7 + .../src/env.d.ts | 0 .../vue/basic-external-atoms/src/index.css | 26 + examples/vue/basic-external-atoms/src/main.ts | 5 + .../vue/basic-external-atoms/src/makeData.ts | 48 ++ .../tsconfig.json | 1 + .../vite.config.ts | 4 +- .../README.md | 0 .../env.d.ts | 0 .../index.html | 0 .../vue/basic-external-state/package.json | 25 + examples/vue/basic-external-state/src/App.tsx | 232 +++++ examples/vue/basic-external-state/src/App.vue | 7 + .../src/env.d.ts | 0 .../vue/basic-external-state/src/index.css | 26 + examples/vue/basic-external-state/src/main.ts | 5 + .../vue/basic-external-state/src/makeData.ts | 48 ++ .../tsconfig.json | 1 + .../vite.config.ts | 4 +- examples/vue/basic-use-app-table/package.json | 1 + examples/vue/basic-use-app-table/src/App.vue | 1 + .../vue/basic-use-app-table/tsconfig.json | 1 + .../vue/basic-use-app-table/vite.config.ts | 3 +- .../vue/{basic => basic-use-table}/.gitignore | 0 examples/vue/basic-use-table/README.md | 6 + examples/vue/basic-use-table/env.d.ts | 1 + examples/vue/basic-use-table/index.html | 14 + .../{basic => basic-use-table}/package.json | 3 +- examples/vue/basic-use-table/src/App.tsx | 168 ++++ examples/vue/basic-use-table/src/App.vue | 7 + examples/vue/basic-use-table/src/env.d.ts | 8 + examples/vue/basic-use-table/src/index.css | 26 + examples/vue/basic-use-table/src/main.ts | 5 + examples/vue/basic-use-table/tsconfig.json | 25 + examples/vue/basic-use-table/vite.config.ts | 7 + examples/vue/basic/public/favicon.ico | Bin 4286 -> 0 bytes examples/vue/basic/src/App.vue | 184 ---- examples/vue/column-groups/README.md | 6 + examples/vue/column-groups/env.d.ts | 1 + examples/vue/column-groups/index.html | 14 + examples/vue/column-groups/package.json | 25 + examples/vue/column-groups/src/App.tsx | 179 ++++ examples/vue/column-groups/src/App.vue | 7 + examples/vue/column-groups/src/env.d.ts | 8 + examples/vue/column-groups/src/index.css | 26 + examples/vue/column-groups/src/main.ts | 5 + examples/vue/column-groups/tsconfig.json | 25 + examples/vue/column-groups/vite.config.ts | 7 + examples/vue/column-ordering/package.json | 5 +- examples/vue/column-ordering/src/App.vue | 16 +- examples/vue/column-ordering/src/index.css | 35 + examples/vue/column-ordering/src/makeData.ts | 2 +- examples/vue/column-ordering/tsconfig.json | 1 + examples/vue/column-ordering/vite.config.ts | 4 +- examples/vue/column-pinning-split/README.md | 6 + examples/vue/column-pinning-split/env.d.ts | 1 + examples/vue/column-pinning-split/index.html | 14 + .../vue/column-pinning-split/package.json | 25 + .../src/App.vue | 166 ++-- .../vue/column-pinning-split/src/env.d.ts | 8 + .../vue/column-pinning-split/src/index.css | 26 + .../src/main.ts | 0 .../vue/column-pinning-split/src/makeData.ts | 47 + .../vue/column-pinning-split/tsconfig.json | 25 + .../vue/column-pinning-split/vite.config.ts | 7 + examples/vue/column-pinning-sticky/README.md | 6 + examples/vue/column-pinning-sticky/env.d.ts | 1 + examples/vue/column-pinning-sticky/index.html | 14 + .../vue/column-pinning-sticky/package.json | 25 + .../vue/column-pinning-sticky/src/App.vue | 238 ++++++ .../vue/column-pinning-sticky/src/env.d.ts | 8 + .../vue/column-pinning-sticky/src/index.css | 49 ++ .../src/main.ts | 0 .../vue/column-pinning-sticky/src/makeData.ts | 47 + .../vue/column-pinning-sticky/tsconfig.json | 25 + .../vue/column-pinning-sticky/vite.config.ts | 7 + examples/vue/column-pinning/package.json | 2 + examples/vue/column-pinning/src/App.vue | 14 +- examples/vue/column-pinning/src/index.css | 26 + examples/vue/column-pinning/src/makeData.ts | 5 +- examples/vue/column-pinning/tsconfig.json | 1 + examples/vue/column-pinning/vite.config.ts | 4 +- .../vue/column-resizing-performant/README.md | 6 + .../vue/column-resizing-performant/env.d.ts | 1 + .../vue/column-resizing-performant/index.html | 14 + .../column-resizing-performant/package.json | 25 + .../column-resizing-performant/src/App.vue | 238 ++++++ .../column-resizing-performant/src/env.d.ts | 8 + .../column-resizing-performant/src/index.css | 72 ++ .../column-resizing-performant/src/main.ts | 4 + .../src/makeData.ts | 43 + .../column-resizing-performant/tsconfig.json | 25 + .../column-resizing-performant/vite.config.ts | 7 + examples/vue/column-resizing/README.md | 6 + examples/vue/column-resizing/env.d.ts | 1 + examples/vue/column-resizing/index.html | 14 + examples/vue/column-resizing/package.json | 25 + examples/vue/column-resizing/src/App.vue | 238 ++++++ examples/vue/column-resizing/src/env.d.ts | 8 + examples/vue/column-resizing/src/index.css | 80 ++ examples/vue/column-resizing/src/main.ts | 4 + examples/vue/column-resizing/src/makeData.ts | 48 ++ examples/vue/column-resizing/tsconfig.json | 25 + examples/vue/column-resizing/vite.config.ts | 7 + examples/vue/column-sizing/README.md | 6 + examples/vue/column-sizing/env.d.ts | 1 + examples/vue/column-sizing/index.html | 14 + examples/vue/column-sizing/package.json | 25 + examples/vue/column-sizing/src/App.vue | 238 ++++++ examples/vue/column-sizing/src/env.d.ts | 8 + examples/vue/column-sizing/src/index.css | 26 + examples/vue/column-sizing/src/main.ts | 4 + examples/vue/column-sizing/src/makeData.ts | 48 ++ examples/vue/column-sizing/tsconfig.json | 25 + examples/vue/column-sizing/vite.config.ts | 7 + examples/vue/column-visibility/README.md | 6 + examples/vue/column-visibility/env.d.ts | 1 + examples/vue/column-visibility/index.html | 14 + examples/vue/column-visibility/package.json | 25 + examples/vue/column-visibility/src/App.tsx | 211 +++++ examples/vue/column-visibility/src/App.vue | 7 + examples/vue/column-visibility/src/env.d.ts | 8 + examples/vue/column-visibility/src/index.css | 26 + examples/vue/column-visibility/src/main.ts | 5 + examples/vue/column-visibility/tsconfig.json | 25 + examples/vue/column-visibility/vite.config.ts | 7 + examples/vue/composable-tables/package.json | 1 + .../src/components/ProductsTable.vue | 1 + .../src/components/UsersTable.vue | 1 + examples/vue/composable-tables/src/index.css | 249 ++++++ .../vue/composable-tables/src/makeData.ts | 84 +- examples/vue/composable-tables/tsconfig.json | 1 + examples/vue/composable-tables/vite.config.ts | 3 +- examples/vue/expanding/README.md | 6 + examples/vue/expanding/env.d.ts | 1 + examples/vue/expanding/index.html | 14 + examples/vue/expanding/package.json | 25 + examples/vue/expanding/src/App.tsx | 333 ++++++++ examples/vue/expanding/src/App.vue | 7 + examples/vue/expanding/src/env.d.ts | 8 + examples/vue/expanding/src/index.css | 21 + examples/vue/expanding/src/main.ts | 5 + examples/vue/expanding/src/makeData.ts | 43 + examples/vue/expanding/tsconfig.json | 25 + examples/vue/expanding/vite.config.ts | 7 + examples/vue/filters-faceted/README.md | 6 + examples/vue/filters-faceted/env.d.ts | 1 + examples/vue/filters-faceted/index.html | 14 + examples/vue/filters-faceted/package.json | 25 + examples/vue/filters-faceted/src/App.vue | 238 ++++++ examples/vue/filters-faceted/src/env.d.ts | 8 + examples/vue/filters-faceted/src/index.css | 26 + examples/vue/filters-faceted/src/main.ts | 4 + examples/vue/filters-faceted/src/makeData.ts | 48 ++ examples/vue/filters-faceted/tsconfig.json | 25 + examples/vue/filters-faceted/vite.config.ts | 7 + examples/vue/filters-fuzzy/README.md | 6 + examples/vue/filters-fuzzy/env.d.ts | 1 + examples/vue/filters-fuzzy/index.html | 14 + examples/vue/filters-fuzzy/package.json | 25 + examples/vue/filters-fuzzy/src/App.vue | 238 ++++++ examples/vue/filters-fuzzy/src/env.d.ts | 8 + examples/vue/filters-fuzzy/src/index.css | 21 + examples/vue/filters-fuzzy/src/main.ts | 4 + examples/vue/filters-fuzzy/src/makeData.ts | 45 + examples/vue/filters-fuzzy/tsconfig.json | 25 + examples/vue/filters-fuzzy/vite.config.ts | 7 + examples/vue/filters/package.json | 1 + examples/vue/filters/src/App.vue | 1 + examples/vue/filters/src/index.css | 26 + examples/vue/filters/src/makeData.ts | 48 ++ examples/vue/filters/tsconfig.json | 1 + examples/vue/filters/vite.config.ts | 4 +- examples/vue/grouping/README.md | 6 + examples/vue/grouping/env.d.ts | 1 + examples/vue/grouping/index.html | 14 + .../package.json | 3 +- examples/vue/grouping/src/App.vue | 238 ++++++ examples/vue/grouping/src/env.d.ts | 8 + examples/vue/grouping/src/index.css | 26 + examples/vue/grouping/src/main.ts | 4 + examples/vue/grouping/src/makeData.ts | 43 + examples/vue/grouping/tsconfig.json | 25 + examples/vue/grouping/vite.config.ts | 7 + .../pagination-controlled/public/favicon.ico | Bin 4286 -> 0 bytes examples/vue/pagination/package.json | 1 + examples/vue/pagination/src/index.css | 21 + examples/vue/pagination/src/makeData.ts | 41 +- examples/vue/pagination/tsconfig.json | 1 + examples/vue/pagination/vite.config.ts | 4 +- examples/vue/row-pinning/README.md | 6 + examples/vue/row-pinning/env.d.ts | 1 + examples/vue/row-pinning/index.html | 14 + examples/vue/row-pinning/package.json | 25 + examples/vue/row-pinning/src/App.vue | 238 ++++++ examples/vue/row-pinning/src/env.d.ts | 8 + examples/vue/row-pinning/src/index.css | 26 + examples/vue/row-pinning/src/main.ts | 4 + examples/vue/row-pinning/src/makeData.ts | 43 + examples/vue/row-pinning/tsconfig.json | 25 + examples/vue/row-pinning/vite.config.ts | 7 + examples/vue/row-selection/package.json | 7 +- examples/vue/row-selection/src/App.vue | 1 + .../src/IndeterminateCheckbox.vue | 19 +- examples/vue/row-selection/src/index.css | 26 + examples/vue/row-selection/src/main.ts | 19 +- examples/vue/row-selection/src/makeData.ts | 4 +- examples/vue/row-selection/tsconfig.json | 1 + examples/vue/row-selection/vite.config.ts | 1 - examples/vue/sorting/package.json | 1 + examples/vue/sorting/src/App.vue | 3 - examples/vue/sorting/src/index.css | 26 + examples/vue/sorting/src/makeData.ts | 4 +- examples/vue/sorting/tsconfig.json | 1 + examples/vue/sorting/vite.config.ts | 4 +- examples/vue/sub-components/package.json | 3 +- examples/vue/sub-components/src/App.vue | 1 + examples/vue/sub-components/src/index.css | 21 + examples/vue/sub-components/src/makeData.ts | 43 + examples/vue/sub-components/tsconfig.json | 1 + examples/vue/sub-components/vite.config.ts | 4 +- examples/vue/virtualized-columns/README.md | 6 + examples/vue/virtualized-columns/env.d.ts | 1 + examples/vue/virtualized-columns/index.html | 14 + examples/vue/virtualized-columns/package.json | 26 + examples/vue/virtualized-columns/src/App.vue | 232 +++++ examples/vue/virtualized-columns/src/env.d.ts | 8 + .../vue/virtualized-columns/src/index.css | 40 + examples/vue/virtualized-columns/src/main.ts | 5 + .../vue/virtualized-columns/src/makeData.ts | 17 + .../vue/virtualized-columns/tsconfig.json | 25 + .../vue/virtualized-columns/vite.config.ts | 7 + .../virtualized-infinite-scrolling/README.md | 6 + .../virtualized-infinite-scrolling/env.d.ts | 1 + .../virtualized-infinite-scrolling/index.html | 14 + .../package.json | 28 + .../src/App.vue | 250 ++++++ .../src/env.d.ts | 8 + .../src/index.css | 40 + .../src/main.ts | 8 + .../src/makeData.ts | 89 ++ .../tsconfig.json | 25 + .../vite.config.ts | 7 + examples/vue/virtualized-rows/package.json | 4 +- examples/vue/virtualized-rows/src/index.css | 16 +- examples/vue/virtualized-rows/src/makeData.ts | 47 +- examples/vue/virtualized-rows/tsconfig.json | 1 + examples/vue/virtualized-rows/vite.config.ts | 4 +- examples/vue/with-tanstack-form/README.md | 6 + examples/vue/with-tanstack-form/env.d.ts | 1 + examples/vue/with-tanstack-form/index.html | 14 + examples/vue/with-tanstack-form/package.json | 27 + examples/vue/with-tanstack-form/src/App.vue | 238 ++++++ examples/vue/with-tanstack-form/src/env.d.ts | 8 + examples/vue/with-tanstack-form/src/index.css | 26 + examples/vue/with-tanstack-form/src/main.ts | 4 + .../vue/with-tanstack-form/src/makeData.ts | 48 ++ examples/vue/with-tanstack-form/tsconfig.json | 25 + .../vue/with-tanstack-form/vite.config.ts | 7 + .../.gitignore | 0 examples/vue/with-tanstack-query/README.md | 6 + examples/vue/with-tanstack-query/env.d.ts | 1 + examples/vue/with-tanstack-query/index.html | 14 + examples/vue/with-tanstack-query/package.json | 27 + examples/vue/with-tanstack-query/src/App.tsx | 199 +++++ examples/vue/with-tanstack-query/src/App.vue | 7 + examples/vue/with-tanstack-query/src/env.d.ts | 8 + .../vue/with-tanstack-query/src/fetchData.ts | 66 ++ .../vue/with-tanstack-query/src/index.css | 26 + examples/vue/with-tanstack-query/src/main.ts | 8 + .../src/useService.ts | 0 .../vue/with-tanstack-query/tsconfig.json | 25 + .../vue/with-tanstack-query/vite.config.ts | 7 + knip.json | 8 +- packages/angular-table/package.json | 7 +- .../angular-table/static-functions/index.ts | 1 + .../static-functions/ng-package.json | 6 + packages/lit-table/package.json | 4 + packages/lit-table/src/static-functions.ts | 1 + packages/lit-table/tsdown.config.ts | 2 +- packages/preact-table/package.json | 4 + packages/preact-table/src/Subscribe.ts | 6 +- packages/preact-table/src/static-functions.ts | 1 + packages/preact-table/tsdown.config.ts | 2 +- packages/react-table/package.json | 4 + packages/react-table/src/static-functions.ts | 1 + packages/react-table/tsdown.config.ts | 2 +- packages/solid-table/package.json | 5 + packages/solid-table/src/createTable.ts | 17 +- packages/solid-table/src/static-functions.ts | 1 + packages/solid-table/tsdown.config.ts | 2 +- packages/svelte-table/package.json | 5 + packages/svelte-table/src/static-functions.ts | 1 + packages/table-core/package.json | 4 + .../src/core/columns/coreColumnsFeature.ts | 8 +- .../src/core/headers/coreHeadersFeature.ts | 8 +- .../core/headers/coreHeadersFeature.utils.ts | 2 +- .../src/core/table/constructTable.ts | 84 +- .../src/core/table/coreTablesFeature.types.ts | 77 +- .../src/core/table/coreTablesFeature.utils.ts | 8 +- .../column-faceting/columnFacetingFeature.ts | 8 +- .../column-faceting/createFacetedRowModel.ts | 4 +- .../columnFilteringFeature.utils.ts | 8 +- .../createFilteredRowModel.ts | 4 +- .../columnGroupingFeature.utils.ts | 4 +- .../column-grouping/createGroupedRowModel.ts | 4 +- .../column-ordering/columnOrderingFeature.ts | 10 +- .../columnOrderingFeature.utils.ts | 2 +- .../column-pinning/columnPinningFeature.ts | 42 +- .../columnPinningFeature.utils.ts | 24 +- .../columnResizingFeature.utils.ts | 2 +- .../column-sizing/columnSizingFeature.ts | 4 +- .../columnSizingFeature.utils.ts | 2 +- .../columnVisibilityFeature.ts | 12 +- .../columnVisibilityFeature.utils.ts | 2 +- .../row-expanding/createExpandedRowModel.ts | 4 +- .../rowExpandingFeature.utils.ts | 10 +- .../row-pagination/createPaginatedRowModel.ts | 6 +- .../rowPaginationFeature.utils.ts | 6 +- .../features/row-pinning/rowPinningFeature.ts | 8 +- .../row-pinning/rowPinningFeature.utils.ts | 8 +- .../row-selection/rowSelectionFeature.ts | 6 +- .../rowSelectionFeature.types.ts | 2 +- .../rowSelectionFeature.utils.ts | 16 +- .../row-sorting/createSortedRowModel.ts | 4 +- .../row-sorting/rowSortingFeature.utils.ts | 8 +- .../tableReactivityFeature.ts | 50 ++ packages/table-core/src/index.ts | 20 - packages/table-core/src/static-functions.ts | 31 + packages/table-core/src/types/Table.ts | 13 +- packages/table-core/src/utils.ts | 11 +- .../row-pinning/rowPinningFeature.test.ts | 11 +- .../tests/unit/core/tableAtoms.test.ts | 176 ++++ .../columnOrderingFeature.utils.test.ts | 2 +- .../columnPinningFeature.utils.test.ts | 2 +- .../columnResizingFeature.utils.test.ts | 2 +- .../columnVisibilityFeature.utils.test.ts | 8 +- .../rowPinningFeature.utils.test.ts | 32 +- packages/table-core/tsdown.config.ts | 2 +- .../table-devtools/src/components/Shell.tsx | 2 +- .../src/components/StatePanel.tsx | 280 +++--- .../src/components/ThreeWayResizableSplit.tsx | 111 +++ .../table-devtools/src/styles/use-styles.ts | 58 ++ packages/vue-table/package.json | 4 + packages/vue-table/src/merge-proxy.ts | 27 +- packages/vue-table/src/static-functions.ts | 1 + packages/vue-table/src/useTable.ts | 108 ++- packages/vue-table/tsdown.config.ts | 2 +- pnpm-lock.yaml | 804 ++++++++++++++++-- 757 files changed, 10334 insertions(+), 9737 deletions(-) delete mode 100644 docs/reference/functions/cell_getContext.md delete mode 100644 docs/reference/functions/cell_getIsAggregated.md delete mode 100644 docs/reference/functions/cell_getIsGrouped.md delete mode 100644 docs/reference/functions/cell_getIsPlaceholder.md delete mode 100644 docs/reference/functions/cell_getValue.md delete mode 100644 docs/reference/functions/cell_renderValue.md delete mode 100644 docs/reference/functions/column_clearSorting.md delete mode 100644 docs/reference/functions/column_getAfter.md delete mode 100644 docs/reference/functions/column_getAggregationFn.md delete mode 100644 docs/reference/functions/column_getAutoAggregationFn.md delete mode 100644 docs/reference/functions/column_getAutoFilterFn.md delete mode 100644 docs/reference/functions/column_getAutoSortDir.md delete mode 100644 docs/reference/functions/column_getAutoSortFn.md delete mode 100644 docs/reference/functions/column_getCanFilter.md delete mode 100644 docs/reference/functions/column_getCanGlobalFilter.md delete mode 100644 docs/reference/functions/column_getCanGroup.md delete mode 100644 docs/reference/functions/column_getCanHide.md delete mode 100644 docs/reference/functions/column_getCanMultiSort.md delete mode 100644 docs/reference/functions/column_getCanPin.md delete mode 100644 docs/reference/functions/column_getCanResize.md delete mode 100644 docs/reference/functions/column_getCanSort.md delete mode 100644 docs/reference/functions/column_getFacetedMinMaxValues.md delete mode 100644 docs/reference/functions/column_getFacetedRowModel.md delete mode 100644 docs/reference/functions/column_getFacetedUniqueValues.md delete mode 100644 docs/reference/functions/column_getFilterFn.md delete mode 100644 docs/reference/functions/column_getFilterIndex.md delete mode 100644 docs/reference/functions/column_getFilterValue.md delete mode 100644 docs/reference/functions/column_getFirstSortDir.md delete mode 100644 docs/reference/functions/column_getFlatColumns.md delete mode 100644 docs/reference/functions/column_getGroupedIndex.md delete mode 100644 docs/reference/functions/column_getIndex.md delete mode 100644 docs/reference/functions/column_getIsFiltered.md delete mode 100644 docs/reference/functions/column_getIsFirstColumn.md delete mode 100644 docs/reference/functions/column_getIsGrouped.md delete mode 100644 docs/reference/functions/column_getIsLastColumn.md delete mode 100644 docs/reference/functions/column_getIsPinned.md delete mode 100644 docs/reference/functions/column_getIsResizing.md delete mode 100644 docs/reference/functions/column_getIsSorted.md delete mode 100644 docs/reference/functions/column_getIsVisible.md delete mode 100644 docs/reference/functions/column_getLeafColumns.md delete mode 100644 docs/reference/functions/column_getNextSortingOrder.md delete mode 100644 docs/reference/functions/column_getPinnedIndex.md delete mode 100644 docs/reference/functions/column_getSize.md delete mode 100644 docs/reference/functions/column_getSortFn.md delete mode 100644 docs/reference/functions/column_getSortIndex.md delete mode 100644 docs/reference/functions/column_getStart.md delete mode 100644 docs/reference/functions/column_getToggleGroupingHandler.md delete mode 100644 docs/reference/functions/column_getToggleSortingHandler.md delete mode 100644 docs/reference/functions/column_getToggleVisibilityHandler.md delete mode 100644 docs/reference/functions/column_pin.md delete mode 100644 docs/reference/functions/column_resetSize.md delete mode 100644 docs/reference/functions/column_setFilterValue.md delete mode 100644 docs/reference/functions/column_toggleGrouping.md delete mode 100644 docs/reference/functions/column_toggleSorting.md delete mode 100644 docs/reference/functions/column_toggleVisibility.md delete mode 100644 docs/reference/functions/createTableStore.md delete mode 100644 docs/reference/functions/getDefaultColumnFiltersState.md delete mode 100644 docs/reference/functions/getDefaultColumnOrderState.md delete mode 100644 docs/reference/functions/getDefaultColumnPinningState.md delete mode 100644 docs/reference/functions/getDefaultColumnResizingState.md delete mode 100644 docs/reference/functions/getDefaultColumnSizingColumnDef.md delete mode 100644 docs/reference/functions/getDefaultColumnSizingState.md delete mode 100644 docs/reference/functions/getDefaultColumnVisibilityState.md delete mode 100644 docs/reference/functions/getDefaultExpandedState.md delete mode 100644 docs/reference/functions/getDefaultGroupingState.md delete mode 100644 docs/reference/functions/getDefaultPaginationState.md delete mode 100644 docs/reference/functions/getDefaultRowPinningState.md delete mode 100644 docs/reference/functions/getDefaultRowSelectionState.md delete mode 100644 docs/reference/functions/getDefaultSortingState.md delete mode 100644 docs/reference/functions/header_getContext.md delete mode 100644 docs/reference/functions/header_getLeafHeaders.md delete mode 100644 docs/reference/functions/header_getResizeHandler.md delete mode 100644 docs/reference/functions/header_getSize.md delete mode 100644 docs/reference/functions/header_getStart.md delete mode 100644 docs/reference/functions/isRowSelected.md delete mode 100644 docs/reference/functions/isSubRowSelected.md delete mode 100644 docs/reference/functions/isTouchStartEvent.md delete mode 100644 docs/reference/functions/orderColumns.md delete mode 100644 docs/reference/functions/passiveEventSupported.md delete mode 100644 docs/reference/functions/row_getAllCells.md delete mode 100644 docs/reference/functions/row_getAllCellsByColumnId.md delete mode 100644 docs/reference/functions/row_getAllVisibleCells.md delete mode 100644 docs/reference/functions/row_getCanExpand.md delete mode 100644 docs/reference/functions/row_getCanMultiSelect.md delete mode 100644 docs/reference/functions/row_getCanPin.md delete mode 100644 docs/reference/functions/row_getCanSelect.md delete mode 100644 docs/reference/functions/row_getCanSelectSubRows.md delete mode 100644 docs/reference/functions/row_getCenterVisibleCells.md delete mode 100644 docs/reference/functions/row_getGroupingValue.md delete mode 100644 docs/reference/functions/row_getIsAllParentsExpanded.md delete mode 100644 docs/reference/functions/row_getIsAllSubRowsSelected.md delete mode 100644 docs/reference/functions/row_getIsExpanded.md delete mode 100644 docs/reference/functions/row_getIsGrouped.md delete mode 100644 docs/reference/functions/row_getIsPinned.md delete mode 100644 docs/reference/functions/row_getIsSelected.md delete mode 100644 docs/reference/functions/row_getIsSomeSelected.md delete mode 100644 docs/reference/functions/row_getLeafRows.md delete mode 100644 docs/reference/functions/row_getLeftVisibleCells.md delete mode 100644 docs/reference/functions/row_getParentRow.md delete mode 100644 docs/reference/functions/row_getParentRows.md delete mode 100644 docs/reference/functions/row_getPinnedIndex.md delete mode 100644 docs/reference/functions/row_getRightVisibleCells.md delete mode 100644 docs/reference/functions/row_getToggleExpandedHandler.md delete mode 100644 docs/reference/functions/row_getToggleSelectedHandler.md delete mode 100644 docs/reference/functions/row_getUniqueValues.md delete mode 100644 docs/reference/functions/row_getValue.md delete mode 100644 docs/reference/functions/row_getVisibleCells.md delete mode 100644 docs/reference/functions/row_pin.md delete mode 100644 docs/reference/functions/row_renderValue.md delete mode 100644 docs/reference/functions/row_toggleExpanded.md delete mode 100644 docs/reference/functions/row_toggleSelected.md delete mode 100644 docs/reference/functions/selectRowsFn.md delete mode 100644 docs/reference/functions/shouldAutoRemoveFilter.md delete mode 100644 docs/reference/functions/table_autoResetExpanded.md delete mode 100644 docs/reference/functions/table_autoResetPageIndex.md delete mode 100644 docs/reference/functions/table_firstPage.md delete mode 100644 docs/reference/functions/table_getAllColumns.md delete mode 100644 docs/reference/functions/table_getAllFlatColumns.md delete mode 100644 docs/reference/functions/table_getAllFlatColumnsById.md delete mode 100644 docs/reference/functions/table_getAllLeafColumns.md delete mode 100644 docs/reference/functions/table_getBottomRows.md delete mode 100644 docs/reference/functions/table_getCanNextPage.md delete mode 100644 docs/reference/functions/table_getCanPreviousPage.md delete mode 100644 docs/reference/functions/table_getCanSomeRowsExpand.md delete mode 100644 docs/reference/functions/table_getCenterFlatHeaders.md delete mode 100644 docs/reference/functions/table_getCenterFooterGroups.md delete mode 100644 docs/reference/functions/table_getCenterHeaderGroups.md delete mode 100644 docs/reference/functions/table_getCenterLeafColumns.md delete mode 100644 docs/reference/functions/table_getCenterLeafHeaders.md delete mode 100644 docs/reference/functions/table_getCenterRows.md delete mode 100644 docs/reference/functions/table_getCenterTotalSize.md delete mode 100644 docs/reference/functions/table_getCenterVisibleLeafColumns.md delete mode 100644 docs/reference/functions/table_getColumn.md delete mode 100644 docs/reference/functions/table_getCoreRowModel.md delete mode 100644 docs/reference/functions/table_getDefaultColumnDef.md delete mode 100644 docs/reference/functions/table_getExpandedDepth.md delete mode 100644 docs/reference/functions/table_getExpandedRowModel.md delete mode 100644 docs/reference/functions/table_getFilteredRowModel.md delete mode 100644 docs/reference/functions/table_getFilteredSelectedRowModel.md delete mode 100644 docs/reference/functions/table_getFlatHeaders.md delete mode 100644 docs/reference/functions/table_getFooterGroups.md delete mode 100644 docs/reference/functions/table_getGlobalAutoFilterFn.md delete mode 100644 docs/reference/functions/table_getGlobalFacetedMinMaxValues.md delete mode 100644 docs/reference/functions/table_getGlobalFacetedRowModel.md delete mode 100644 docs/reference/functions/table_getGlobalFacetedUniqueValues.md delete mode 100644 docs/reference/functions/table_getGlobalFilterFn.md delete mode 100644 docs/reference/functions/table_getGroupedRowModel.md delete mode 100644 docs/reference/functions/table_getGroupedSelectedRowModel.md delete mode 100644 docs/reference/functions/table_getHeaderGroups.md delete mode 100644 docs/reference/functions/table_getIsAllColumnsVisible.md delete mode 100644 docs/reference/functions/table_getIsAllPageRowsSelected.md delete mode 100644 docs/reference/functions/table_getIsAllRowsExpanded.md delete mode 100644 docs/reference/functions/table_getIsAllRowsSelected.md delete mode 100644 docs/reference/functions/table_getIsSomeColumnsPinned.md delete mode 100644 docs/reference/functions/table_getIsSomeColumnsVisible.md delete mode 100644 docs/reference/functions/table_getIsSomePageRowsSelected.md delete mode 100644 docs/reference/functions/table_getIsSomeRowsExpanded.md delete mode 100644 docs/reference/functions/table_getIsSomeRowsPinned.md delete mode 100644 docs/reference/functions/table_getIsSomeRowsSelected.md delete mode 100644 docs/reference/functions/table_getLeafHeaders.md delete mode 100644 docs/reference/functions/table_getLeftFlatHeaders.md delete mode 100644 docs/reference/functions/table_getLeftFooterGroups.md delete mode 100644 docs/reference/functions/table_getLeftHeaderGroups.md delete mode 100644 docs/reference/functions/table_getLeftLeafColumns.md delete mode 100644 docs/reference/functions/table_getLeftLeafHeaders.md delete mode 100644 docs/reference/functions/table_getLeftTotalSize.md delete mode 100644 docs/reference/functions/table_getLeftVisibleLeafColumns.md delete mode 100644 docs/reference/functions/table_getOrderColumnsFn.md delete mode 100644 docs/reference/functions/table_getPageCount.md delete mode 100644 docs/reference/functions/table_getPageOptions.md delete mode 100644 docs/reference/functions/table_getPaginatedRowModel.md delete mode 100644 docs/reference/functions/table_getPinnedLeafColumns.md delete mode 100644 docs/reference/functions/table_getPinnedVisibleLeafColumns.md delete mode 100644 docs/reference/functions/table_getPreExpandedRowModel.md delete mode 100644 docs/reference/functions/table_getPreFilteredRowModel.md delete mode 100644 docs/reference/functions/table_getPreGroupedRowModel.md delete mode 100644 docs/reference/functions/table_getPrePaginatedRowModel.md delete mode 100644 docs/reference/functions/table_getPreSelectedRowModel.md delete mode 100644 docs/reference/functions/table_getPreSortedRowModel.md delete mode 100644 docs/reference/functions/table_getRightFlatHeaders.md delete mode 100644 docs/reference/functions/table_getRightFooterGroups.md delete mode 100644 docs/reference/functions/table_getRightHeaderGroups.md delete mode 100644 docs/reference/functions/table_getRightLeafColumns.md delete mode 100644 docs/reference/functions/table_getRightLeafHeaders.md delete mode 100644 docs/reference/functions/table_getRightTotalSize.md delete mode 100644 docs/reference/functions/table_getRightVisibleLeafColumns.md delete mode 100644 docs/reference/functions/table_getRow.md delete mode 100644 docs/reference/functions/table_getRowCount.md delete mode 100644 docs/reference/functions/table_getRowId.md delete mode 100644 docs/reference/functions/table_getRowModel.md delete mode 100644 docs/reference/functions/table_getSelectedRowModel.md delete mode 100644 docs/reference/functions/table_getSortedRowModel.md delete mode 100644 docs/reference/functions/table_getToggleAllColumnsVisibilityHandler.md delete mode 100644 docs/reference/functions/table_getToggleAllPageRowsSelectedHandler.md delete mode 100644 docs/reference/functions/table_getToggleAllRowsExpandedHandler.md delete mode 100644 docs/reference/functions/table_getToggleAllRowsSelectedHandler.md delete mode 100644 docs/reference/functions/table_getTopRows.md delete mode 100644 docs/reference/functions/table_getTotalSize.md delete mode 100644 docs/reference/functions/table_getVisibleFlatColumns.md delete mode 100644 docs/reference/functions/table_getVisibleLeafColumns.md delete mode 100644 docs/reference/functions/table_lastPage.md delete mode 100644 docs/reference/functions/table_mergeOptions.md delete mode 100644 docs/reference/functions/table_nextPage.md delete mode 100644 docs/reference/functions/table_previousPage.md delete mode 100644 docs/reference/functions/table_reset.md delete mode 100644 docs/reference/functions/table_resetColumnFilters.md delete mode 100644 docs/reference/functions/table_resetColumnOrder.md delete mode 100644 docs/reference/functions/table_resetColumnPinning.md delete mode 100644 docs/reference/functions/table_resetColumnSizing.md delete mode 100644 docs/reference/functions/table_resetColumnVisibility.md delete mode 100644 docs/reference/functions/table_resetExpanded.md delete mode 100644 docs/reference/functions/table_resetGlobalFilter.md delete mode 100644 docs/reference/functions/table_resetGrouping.md delete mode 100644 docs/reference/functions/table_resetHeaderSizeInfo.md delete mode 100644 docs/reference/functions/table_resetPageIndex.md delete mode 100644 docs/reference/functions/table_resetPageSize.md delete mode 100644 docs/reference/functions/table_resetPagination.md delete mode 100644 docs/reference/functions/table_resetRowPinning.md delete mode 100644 docs/reference/functions/table_resetRowSelection.md delete mode 100644 docs/reference/functions/table_resetSorting.md delete mode 100644 docs/reference/functions/table_setColumnFilters.md delete mode 100644 docs/reference/functions/table_setColumnOrder.md delete mode 100644 docs/reference/functions/table_setColumnPinning.md delete mode 100644 docs/reference/functions/table_setColumnResizing.md delete mode 100644 docs/reference/functions/table_setColumnSizing.md delete mode 100644 docs/reference/functions/table_setColumnVisibility.md delete mode 100644 docs/reference/functions/table_setExpanded.md delete mode 100644 docs/reference/functions/table_setGlobalFilter.md delete mode 100644 docs/reference/functions/table_setGrouping.md delete mode 100644 docs/reference/functions/table_setOptions.md delete mode 100644 docs/reference/functions/table_setPageIndex.md delete mode 100644 docs/reference/functions/table_setPageSize.md delete mode 100644 docs/reference/functions/table_setPagination.md delete mode 100644 docs/reference/functions/table_setRowPinning.md delete mode 100644 docs/reference/functions/table_setRowSelection.md delete mode 100644 docs/reference/functions/table_setSorting.md delete mode 100644 docs/reference/functions/table_toggleAllColumnsVisible.md delete mode 100644 docs/reference/functions/table_toggleAllPageRowsSelected.md delete mode 100644 docs/reference/functions/table_toggleAllRowsExpanded.md delete mode 100644 docs/reference/functions/table_toggleAllRowsSelected.md create mode 100644 docs/reference/type-aliases/Atoms.md create mode 100644 docs/reference/type-aliases/Atoms_All.md create mode 100644 docs/reference/type-aliases/BaseAtoms.md create mode 100644 docs/reference/type-aliases/BaseAtoms_All.md create mode 100644 docs/reference/type-aliases/ExternalAtoms.md create mode 100644 docs/reference/type-aliases/ExternalAtoms_All.md rename examples/lit/{basic-external-store => basic-external-atoms}/index.html (100%) rename examples/lit/{basic-external-store => basic-external-atoms}/package.json (81%) rename examples/lit/{basic-external-store => basic-external-atoms}/src/main.ts (79%) rename examples/lit/{basic-external-store => basic-external-atoms}/src/makeData.ts (100%) rename examples/lit/{basic-external-store => basic-external-atoms}/tsconfig.json (100%) rename examples/lit/{basic-external-store => basic-external-atoms}/vite.config.js (100%) rename examples/preact/{basic-external-store => basic-external-atoms}/index.html (100%) rename examples/preact/{basic-external-store => basic-external-atoms}/package.json (85%) rename examples/preact/{basic-external-store => basic-external-atoms}/src/index.css (100%) rename examples/preact/{basic-external-store => basic-external-atoms}/src/main.tsx (82%) rename examples/preact/{basic-external-store => basic-external-atoms}/src/makeData.ts (100%) rename examples/preact/{basic-external-store => basic-external-atoms}/src/vite-env.d.ts (100%) rename examples/preact/{basic-external-store => basic-external-atoms}/tsconfig.json (100%) rename examples/preact/{basic-external-store => basic-external-atoms}/vite.config.ts (100%) rename examples/preact/{basic => basic-use-table}/.gitignore (100%) rename examples/preact/{basic => basic-use-table}/README.md (100%) rename examples/preact/{basic => basic-use-table}/index.html (100%) rename examples/preact/{basic => basic-use-table}/package.json (95%) rename examples/preact/{basic => basic-use-table}/public/vite.svg (100%) rename examples/preact/{basic => basic-use-table}/src/index.css (100%) rename examples/preact/{basic => basic-use-table}/src/main.tsx (99%) rename examples/preact/{basic => basic-use-table}/src/vite-env.d.ts (100%) rename examples/preact/{basic => basic-use-table}/tsconfig.json (100%) rename examples/preact/{basic => basic-use-table}/vite.config.ts (100%) rename examples/react/{basic-external-store => basic-external-atoms}/.gitignore (100%) rename examples/react/{basic-external-store => basic-external-atoms}/README.md (100%) rename examples/react/{basic-external-store => basic-external-atoms}/index.html (100%) rename examples/react/{basic-external-store => basic-external-atoms}/package.json (91%) rename examples/react/{basic-external-store => basic-external-atoms}/src/index.css (100%) rename examples/react/{basic-external-store => basic-external-atoms}/src/main.tsx (81%) rename examples/react/{basic-external-store => basic-external-atoms}/src/makeData.ts (100%) rename examples/react/{basic-external-store => basic-external-atoms}/src/vite-env.d.ts (100%) rename examples/react/{basic-external-store => basic-external-atoms}/tsconfig.json (100%) rename examples/react/{basic-external-store => basic-external-atoms}/vite.config.js (100%) rename examples/solid/{basic-external-store => basic-external-atoms}/.gitignore (100%) rename examples/solid/{basic-external-store => basic-external-atoms}/README.md (100%) rename examples/solid/{basic-external-store => basic-external-atoms}/index.html (100%) rename examples/solid/{basic-external-store => basic-external-atoms}/package.json (81%) rename examples/solid/{basic-external-store => basic-external-atoms}/src/App.tsx (78%) rename examples/solid/{basic-external-store => basic-external-atoms}/src/index.css (100%) rename examples/solid/{basic-external-store => basic-external-atoms}/src/index.tsx (100%) rename examples/solid/{basic-external-store => basic-external-atoms}/src/makeData.ts (100%) rename examples/solid/{basic-external-store => basic-external-atoms}/tsconfig.json (100%) rename examples/solid/{basic-external-store => basic-external-atoms}/vite.config.ts (100%) rename examples/svelte/{basic-external-store => basic-external-atoms}/index.html (100%) rename examples/svelte/{basic-external-store => basic-external-atoms}/package.json (81%) rename examples/svelte/{basic-external-store => basic-external-atoms}/src/App.svelte (78%) rename examples/svelte/{basic-external-store => basic-external-atoms}/src/index.css (100%) rename examples/svelte/{basic-external-store => basic-external-atoms}/src/main.ts (100%) rename examples/svelte/{basic-external-store => basic-external-atoms}/src/makeData.ts (100%) rename examples/svelte/{basic-external-store => basic-external-atoms}/src/vite-env.d.ts (100%) rename examples/svelte/{basic-external-store => basic-external-atoms}/svelte.config.js (100%) rename examples/svelte/{basic-external-store => basic-external-atoms}/tsconfig.json (100%) rename examples/svelte/{basic-external-store => basic-external-atoms}/vite.config.js (100%) rename examples/vue/{basic => basic-external-atoms}/README.md (100%) rename examples/vue/{basic => basic-external-atoms}/env.d.ts (100%) rename examples/vue/{basic => basic-external-atoms}/index.html (100%) create mode 100644 examples/vue/basic-external-atoms/package.json create mode 100644 examples/vue/basic-external-atoms/src/App.tsx create mode 100644 examples/vue/basic-external-atoms/src/App.vue rename examples/vue/{basic => basic-external-atoms}/src/env.d.ts (100%) create mode 100644 examples/vue/basic-external-atoms/src/index.css create mode 100644 examples/vue/basic-external-atoms/src/main.ts create mode 100644 examples/vue/basic-external-atoms/src/makeData.ts rename examples/vue/{basic => basic-external-atoms}/tsconfig.json (95%) rename examples/vue/{basic => basic-external-atoms}/vite.config.ts (59%) rename examples/vue/{pagination-controlled => basic-external-state}/README.md (100%) rename examples/vue/{pagination-controlled => basic-external-state}/env.d.ts (100%) rename examples/vue/{pagination-controlled => basic-external-state}/index.html (100%) create mode 100644 examples/vue/basic-external-state/package.json create mode 100644 examples/vue/basic-external-state/src/App.tsx create mode 100644 examples/vue/basic-external-state/src/App.vue rename examples/vue/{pagination-controlled => basic-external-state}/src/env.d.ts (100%) create mode 100644 examples/vue/basic-external-state/src/index.css create mode 100644 examples/vue/basic-external-state/src/main.ts create mode 100644 examples/vue/basic-external-state/src/makeData.ts rename examples/vue/{pagination-controlled => basic-external-state}/tsconfig.json (95%) rename examples/vue/{pagination-controlled => basic-external-state}/vite.config.ts (59%) rename examples/vue/{basic => basic-use-table}/.gitignore (100%) create mode 100644 examples/vue/basic-use-table/README.md create mode 100644 examples/vue/basic-use-table/env.d.ts create mode 100644 examples/vue/basic-use-table/index.html rename examples/vue/{basic => basic-use-table}/package.json (82%) create mode 100644 examples/vue/basic-use-table/src/App.tsx create mode 100644 examples/vue/basic-use-table/src/App.vue create mode 100644 examples/vue/basic-use-table/src/env.d.ts create mode 100644 examples/vue/basic-use-table/src/index.css create mode 100644 examples/vue/basic-use-table/src/main.ts create mode 100644 examples/vue/basic-use-table/tsconfig.json create mode 100644 examples/vue/basic-use-table/vite.config.ts delete mode 100644 examples/vue/basic/public/favicon.ico delete mode 100644 examples/vue/basic/src/App.vue create mode 100644 examples/vue/column-groups/README.md create mode 100644 examples/vue/column-groups/env.d.ts create mode 100644 examples/vue/column-groups/index.html create mode 100644 examples/vue/column-groups/package.json create mode 100644 examples/vue/column-groups/src/App.tsx create mode 100644 examples/vue/column-groups/src/App.vue create mode 100644 examples/vue/column-groups/src/env.d.ts create mode 100644 examples/vue/column-groups/src/index.css create mode 100644 examples/vue/column-groups/src/main.ts create mode 100644 examples/vue/column-groups/tsconfig.json create mode 100644 examples/vue/column-groups/vite.config.ts create mode 100644 examples/vue/column-ordering/src/index.css create mode 100644 examples/vue/column-pinning-split/README.md create mode 100644 examples/vue/column-pinning-split/env.d.ts create mode 100644 examples/vue/column-pinning-split/index.html create mode 100644 examples/vue/column-pinning-split/package.json rename examples/vue/{pagination-controlled => column-pinning-split}/src/App.vue (52%) create mode 100644 examples/vue/column-pinning-split/src/env.d.ts create mode 100644 examples/vue/column-pinning-split/src/index.css rename examples/vue/{basic => column-pinning-split}/src/main.ts (100%) create mode 100644 examples/vue/column-pinning-split/src/makeData.ts create mode 100644 examples/vue/column-pinning-split/tsconfig.json create mode 100644 examples/vue/column-pinning-split/vite.config.ts create mode 100644 examples/vue/column-pinning-sticky/README.md create mode 100644 examples/vue/column-pinning-sticky/env.d.ts create mode 100644 examples/vue/column-pinning-sticky/index.html create mode 100644 examples/vue/column-pinning-sticky/package.json create mode 100644 examples/vue/column-pinning-sticky/src/App.vue create mode 100644 examples/vue/column-pinning-sticky/src/env.d.ts create mode 100644 examples/vue/column-pinning-sticky/src/index.css rename examples/vue/{pagination-controlled => column-pinning-sticky}/src/main.ts (100%) create mode 100644 examples/vue/column-pinning-sticky/src/makeData.ts create mode 100644 examples/vue/column-pinning-sticky/tsconfig.json create mode 100644 examples/vue/column-pinning-sticky/vite.config.ts create mode 100644 examples/vue/column-pinning/src/index.css create mode 100644 examples/vue/column-resizing-performant/README.md create mode 100644 examples/vue/column-resizing-performant/env.d.ts create mode 100644 examples/vue/column-resizing-performant/index.html create mode 100644 examples/vue/column-resizing-performant/package.json create mode 100644 examples/vue/column-resizing-performant/src/App.vue create mode 100644 examples/vue/column-resizing-performant/src/env.d.ts create mode 100644 examples/vue/column-resizing-performant/src/index.css create mode 100644 examples/vue/column-resizing-performant/src/main.ts create mode 100644 examples/vue/column-resizing-performant/src/makeData.ts create mode 100644 examples/vue/column-resizing-performant/tsconfig.json create mode 100644 examples/vue/column-resizing-performant/vite.config.ts create mode 100644 examples/vue/column-resizing/README.md create mode 100644 examples/vue/column-resizing/env.d.ts create mode 100644 examples/vue/column-resizing/index.html create mode 100644 examples/vue/column-resizing/package.json create mode 100644 examples/vue/column-resizing/src/App.vue create mode 100644 examples/vue/column-resizing/src/env.d.ts create mode 100644 examples/vue/column-resizing/src/index.css create mode 100644 examples/vue/column-resizing/src/main.ts create mode 100644 examples/vue/column-resizing/src/makeData.ts create mode 100644 examples/vue/column-resizing/tsconfig.json create mode 100644 examples/vue/column-resizing/vite.config.ts create mode 100644 examples/vue/column-sizing/README.md create mode 100644 examples/vue/column-sizing/env.d.ts create mode 100644 examples/vue/column-sizing/index.html create mode 100644 examples/vue/column-sizing/package.json create mode 100644 examples/vue/column-sizing/src/App.vue create mode 100644 examples/vue/column-sizing/src/env.d.ts create mode 100644 examples/vue/column-sizing/src/index.css create mode 100644 examples/vue/column-sizing/src/main.ts create mode 100644 examples/vue/column-sizing/src/makeData.ts create mode 100644 examples/vue/column-sizing/tsconfig.json create mode 100644 examples/vue/column-sizing/vite.config.ts create mode 100644 examples/vue/column-visibility/README.md create mode 100644 examples/vue/column-visibility/env.d.ts create mode 100644 examples/vue/column-visibility/index.html create mode 100644 examples/vue/column-visibility/package.json create mode 100644 examples/vue/column-visibility/src/App.tsx create mode 100644 examples/vue/column-visibility/src/App.vue create mode 100644 examples/vue/column-visibility/src/env.d.ts create mode 100644 examples/vue/column-visibility/src/index.css create mode 100644 examples/vue/column-visibility/src/main.ts create mode 100644 examples/vue/column-visibility/tsconfig.json create mode 100644 examples/vue/column-visibility/vite.config.ts create mode 100644 examples/vue/composable-tables/src/index.css create mode 100644 examples/vue/expanding/README.md create mode 100644 examples/vue/expanding/env.d.ts create mode 100644 examples/vue/expanding/index.html create mode 100644 examples/vue/expanding/package.json create mode 100644 examples/vue/expanding/src/App.tsx create mode 100644 examples/vue/expanding/src/App.vue create mode 100644 examples/vue/expanding/src/env.d.ts create mode 100644 examples/vue/expanding/src/index.css create mode 100644 examples/vue/expanding/src/main.ts create mode 100644 examples/vue/expanding/src/makeData.ts create mode 100644 examples/vue/expanding/tsconfig.json create mode 100644 examples/vue/expanding/vite.config.ts create mode 100644 examples/vue/filters-faceted/README.md create mode 100644 examples/vue/filters-faceted/env.d.ts create mode 100644 examples/vue/filters-faceted/index.html create mode 100644 examples/vue/filters-faceted/package.json create mode 100644 examples/vue/filters-faceted/src/App.vue create mode 100644 examples/vue/filters-faceted/src/env.d.ts create mode 100644 examples/vue/filters-faceted/src/index.css create mode 100644 examples/vue/filters-faceted/src/main.ts create mode 100644 examples/vue/filters-faceted/src/makeData.ts create mode 100644 examples/vue/filters-faceted/tsconfig.json create mode 100644 examples/vue/filters-faceted/vite.config.ts create mode 100644 examples/vue/filters-fuzzy/README.md create mode 100644 examples/vue/filters-fuzzy/env.d.ts create mode 100644 examples/vue/filters-fuzzy/index.html create mode 100644 examples/vue/filters-fuzzy/package.json create mode 100644 examples/vue/filters-fuzzy/src/App.vue create mode 100644 examples/vue/filters-fuzzy/src/env.d.ts create mode 100644 examples/vue/filters-fuzzy/src/index.css create mode 100644 examples/vue/filters-fuzzy/src/main.ts create mode 100644 examples/vue/filters-fuzzy/src/makeData.ts create mode 100644 examples/vue/filters-fuzzy/tsconfig.json create mode 100644 examples/vue/filters-fuzzy/vite.config.ts create mode 100644 examples/vue/filters/src/index.css create mode 100644 examples/vue/filters/src/makeData.ts create mode 100644 examples/vue/grouping/README.md create mode 100644 examples/vue/grouping/env.d.ts create mode 100644 examples/vue/grouping/index.html rename examples/vue/{pagination-controlled => grouping}/package.json (84%) create mode 100644 examples/vue/grouping/src/App.vue create mode 100644 examples/vue/grouping/src/env.d.ts create mode 100644 examples/vue/grouping/src/index.css create mode 100644 examples/vue/grouping/src/main.ts create mode 100644 examples/vue/grouping/src/makeData.ts create mode 100644 examples/vue/grouping/tsconfig.json create mode 100644 examples/vue/grouping/vite.config.ts delete mode 100644 examples/vue/pagination-controlled/public/favicon.ico create mode 100644 examples/vue/pagination/src/index.css create mode 100644 examples/vue/row-pinning/README.md create mode 100644 examples/vue/row-pinning/env.d.ts create mode 100644 examples/vue/row-pinning/index.html create mode 100644 examples/vue/row-pinning/package.json create mode 100644 examples/vue/row-pinning/src/App.vue create mode 100644 examples/vue/row-pinning/src/env.d.ts create mode 100644 examples/vue/row-pinning/src/index.css create mode 100644 examples/vue/row-pinning/src/main.ts create mode 100644 examples/vue/row-pinning/src/makeData.ts create mode 100644 examples/vue/row-pinning/tsconfig.json create mode 100644 examples/vue/row-pinning/vite.config.ts create mode 100644 examples/vue/row-selection/src/index.css create mode 100644 examples/vue/sorting/src/index.css create mode 100644 examples/vue/sub-components/src/index.css create mode 100644 examples/vue/sub-components/src/makeData.ts create mode 100644 examples/vue/virtualized-columns/README.md create mode 100644 examples/vue/virtualized-columns/env.d.ts create mode 100644 examples/vue/virtualized-columns/index.html create mode 100644 examples/vue/virtualized-columns/package.json create mode 100644 examples/vue/virtualized-columns/src/App.vue create mode 100644 examples/vue/virtualized-columns/src/env.d.ts create mode 100644 examples/vue/virtualized-columns/src/index.css create mode 100644 examples/vue/virtualized-columns/src/main.ts create mode 100644 examples/vue/virtualized-columns/src/makeData.ts create mode 100644 examples/vue/virtualized-columns/tsconfig.json create mode 100644 examples/vue/virtualized-columns/vite.config.ts create mode 100644 examples/vue/virtualized-infinite-scrolling/README.md create mode 100644 examples/vue/virtualized-infinite-scrolling/env.d.ts create mode 100644 examples/vue/virtualized-infinite-scrolling/index.html create mode 100644 examples/vue/virtualized-infinite-scrolling/package.json create mode 100644 examples/vue/virtualized-infinite-scrolling/src/App.vue create mode 100644 examples/vue/virtualized-infinite-scrolling/src/env.d.ts create mode 100644 examples/vue/virtualized-infinite-scrolling/src/index.css create mode 100644 examples/vue/virtualized-infinite-scrolling/src/main.ts create mode 100644 examples/vue/virtualized-infinite-scrolling/src/makeData.ts create mode 100644 examples/vue/virtualized-infinite-scrolling/tsconfig.json create mode 100644 examples/vue/virtualized-infinite-scrolling/vite.config.ts create mode 100644 examples/vue/with-tanstack-form/README.md create mode 100644 examples/vue/with-tanstack-form/env.d.ts create mode 100644 examples/vue/with-tanstack-form/index.html create mode 100644 examples/vue/with-tanstack-form/package.json create mode 100644 examples/vue/with-tanstack-form/src/App.vue create mode 100644 examples/vue/with-tanstack-form/src/env.d.ts create mode 100644 examples/vue/with-tanstack-form/src/index.css create mode 100644 examples/vue/with-tanstack-form/src/main.ts create mode 100644 examples/vue/with-tanstack-form/src/makeData.ts create mode 100644 examples/vue/with-tanstack-form/tsconfig.json create mode 100644 examples/vue/with-tanstack-form/vite.config.ts rename examples/vue/{pagination-controlled => with-tanstack-query}/.gitignore (100%) create mode 100644 examples/vue/with-tanstack-query/README.md create mode 100644 examples/vue/with-tanstack-query/env.d.ts create mode 100644 examples/vue/with-tanstack-query/index.html create mode 100644 examples/vue/with-tanstack-query/package.json create mode 100644 examples/vue/with-tanstack-query/src/App.tsx create mode 100644 examples/vue/with-tanstack-query/src/App.vue create mode 100644 examples/vue/with-tanstack-query/src/env.d.ts create mode 100644 examples/vue/with-tanstack-query/src/fetchData.ts create mode 100644 examples/vue/with-tanstack-query/src/index.css create mode 100644 examples/vue/with-tanstack-query/src/main.ts rename examples/vue/{pagination-controlled => with-tanstack-query}/src/useService.ts (100%) create mode 100644 examples/vue/with-tanstack-query/tsconfig.json create mode 100644 examples/vue/with-tanstack-query/vite.config.ts create mode 100644 packages/angular-table/static-functions/index.ts create mode 100644 packages/angular-table/static-functions/ng-package.json create mode 100644 packages/lit-table/src/static-functions.ts create mode 100644 packages/preact-table/src/static-functions.ts create mode 100644 packages/react-table/src/static-functions.ts create mode 100644 packages/solid-table/src/static-functions.ts create mode 100644 packages/svelte-table/src/static-functions.ts create mode 100644 packages/table-core/src/static-functions.ts create mode 100644 packages/table-core/tests/unit/core/tableAtoms.test.ts create mode 100644 packages/table-devtools/src/components/ThreeWayResizableSplit.tsx create mode 100644 packages/vue-table/src/static-functions.ts diff --git a/docs/config.json b/docs/config.json index 037e9c534d..52de1801d2 100644 --- a/docs/config.json +++ b/docs/config.json @@ -811,7 +811,7 @@ { "to": "framework/lit/examples/basic-table-controller", "label": "Basic (TableController)" }, { "to": "framework/lit/examples/basic-app-table", "label": "Basic (useAppTable)" }, { "to": "framework/lit/examples/basic-external-state", "label": "Basic (External State)" }, - { "to": "framework/lit/examples/basic-external-store", "label": "Basic (External Store)" }, + { "to": "framework/lit/examples/basic-external-atoms", "label": "Basic (External Atoms)" }, { "to": "framework/lit/examples/column-groups", "label": "Header Groups" } ] }, @@ -822,7 +822,7 @@ { "to": "framework/react/examples/basic-use-app-table", "label": "Basic (useAppTable)" }, { "to": "framework/react/examples/basic-use-legacy-table", "label": "Basic (useLegacyTable)" }, { "to": "framework/react/examples/basic-external-state", "label": "Basic (External State)" }, - { "to": "framework/react/examples/basic-external-store", "label": "Basic (External Store)" }, + { "to": "framework/react/examples/basic-external-atoms", "label": "Basic (External Atoms)" }, { "to": "framework/react/examples/basic-shadcn", "label": "Shadcn Basic" }, { "to": "framework/react/examples/column-groups", "label": "Header Groups" } ] @@ -833,7 +833,7 @@ { "to": "framework/solid/examples/basic-use-table", "label": "Basic (createTable)" }, { "to": "framework/solid/examples/basic-app-table", "label": "Basic (createAppTable)" }, { "to": "framework/solid/examples/basic-external-state", "label": "Basic (External State)" }, - { "to": "framework/solid/examples/basic-external-store", "label": "Basic (External Store)" }, + { "to": "framework/solid/examples/basic-external-atoms", "label": "Basic (External Atoms)" }, { "to": "framework/solid/examples/column-groups", "label": "Header Groups" } ] }, @@ -844,15 +844,18 @@ { "to": "framework/svelte/examples/basic-app-table", "label": "Basic (createAppTable)" }, { "to": "framework/svelte/examples/basic-snippets", "label": "Basic (Snippets)" }, { "to": "framework/svelte/examples/basic-external-state", "label": "Basic (External State)" }, - { "to": "framework/svelte/examples/basic-external-store", "label": "Basic (External Store)" }, + { "to": "framework/svelte/examples/basic-external-atoms", "label": "Basic (External Atoms)" }, { "to": "framework/svelte/examples/column-groups", "label": "Header Groups" } ] }, { "label": "vue", "children": [ - { "to": "framework/vue/examples/basic", "label": "Basic" }, - { "to": "framework/vue/examples/basic-use-app-table", "label": "Basic (useAppTable)" } + { "to": "framework/vue/examples/basic-use-table", "label": "Basic (useTable)" }, + { "to": "framework/vue/examples/basic-use-app-table", "label": "Basic (useAppTable)" }, + { "to": "framework/vue/examples/basic-external-state", "label": "Basic (External State)" }, + { "to": "framework/vue/examples/basic-external-atoms", "label": "Basic (External Atoms)" }, + { "to": "framework/vue/examples/column-groups", "label": "Header Groups" } ] }, { @@ -861,7 +864,7 @@ { "to": "framework/preact/examples/basic", "label": "Basic (useTable)" }, { "to": "framework/preact/examples/basic-use-app-table", "label": "Basic (useAppTable)" }, { "to": "framework/preact/examples/basic-external-state", "label": "Basic (External State)" }, - { "to": "framework/preact/examples/basic-external-store", "label": "Basic (External Store)" }, + { "to": "framework/preact/examples/basic-external-atoms", "label": "Basic (External Atoms)" }, { "to": "framework/preact/examples/column-groups", "label": "Header Groups" } ] }, @@ -986,13 +989,23 @@ { "label": "vue", "children": [ + { "to": "framework/vue/examples/filters", "label": "Column Filters" }, + { "to": "framework/vue/examples/filters-faceted", "label": "Column Filters (Faceted)" }, + { "to": "framework/vue/examples/filters-fuzzy", "label": "Fuzzy Search Filters" }, { "to": "framework/vue/examples/column-ordering", "label": "Column Ordering" }, { "to": "framework/vue/examples/column-pinning", "label": "Column Pinning" }, + { "to": "framework/vue/examples/column-pinning-split", "label": "Column Pinning (Split)" }, + { "to": "framework/vue/examples/column-pinning-sticky", "label": "Sticky Column Pinning" }, + { "to": "framework/vue/examples/column-sizing", "label": "Column Sizing" }, + { "to": "framework/vue/examples/column-resizing", "label": "Column Resizing" }, + { "to": "framework/vue/examples/column-resizing-performant", "label": "Performant Column Resizing" }, + { "to": "framework/vue/examples/column-visibility", "label": "Column Visibility" }, + { "to": "framework/vue/examples/expanding", "label": "Expanding" }, + { "to": "framework/vue/examples/grouping", "label": "Grouping" }, { "to": "framework/vue/examples/pagination", "label": "Pagination" }, - { "to": "framework/vue/examples/pagination-controlled", "label": "Pagination Controlled" }, + { "to": "framework/vue/examples/row-pinning", "label": "Row Pinning" }, { "to": "framework/vue/examples/row-selection", "label": "Row Selection" }, - { "to": "framework/vue/examples/sorting", "label": "Sorting" }, - { "to": "framework/vue/examples/filters", "label": "Column Filters" } + { "to": "framework/vue/examples/sorting", "label": "Sorting" } ] }, { @@ -1098,7 +1111,11 @@ "children": [ { "to": "framework/vue/examples/composable-tables", "label": "Composable Tables" }, { "to": "framework/vue/examples/sub-components", "label": "Sub Components" }, - { "to": "framework/vue/examples/virtualized-rows", "label": "With TanStack Virtual (Rows)" } + { "to": "framework/vue/examples/virtualized-columns", "label": "With TanStack Virtual - Columns" }, + { "to": "framework/vue/examples/virtualized-rows", "label": "With TanStack Virtual - Rows" }, + { "to": "framework/vue/examples/virtualized-infinite-scrolling", "label": "With TanStack Virtual - Infinite Scrolling" }, + { "to": "framework/vue/examples/with-tanstack-form", "label": "With TanStack Form" }, + { "to": "framework/vue/examples/with-tanstack-query", "label": "With TanStack Query" } ] }, { diff --git a/docs/reference/functions/assignPrototypeAPIs.md b/docs/reference/functions/assignPrototypeAPIs.md index 2676b92797..dd50c8f3d6 100644 --- a/docs/reference/functions/assignPrototypeAPIs.md +++ b/docs/reference/functions/assignPrototypeAPIs.md @@ -13,7 +13,7 @@ function assignPrototypeAPIs( apis): void; ``` -Defined in: [utils.ts:339](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L339) +Defined in: [utils.ts:334](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L334) Assigns API methods to a prototype object for memory-efficient method sharing. All instances created with this prototype will share the same method references. diff --git a/docs/reference/functions/assignTableAPIs.md b/docs/reference/functions/assignTableAPIs.md index cca846b169..ab061cda1d 100644 --- a/docs/reference/functions/assignTableAPIs.md +++ b/docs/reference/functions/assignTableAPIs.md @@ -12,7 +12,7 @@ function assignTableAPIs( apis): void; ``` -Defined in: [utils.ts:297](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L297) +Defined in: [utils.ts:292](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L292) Assigns Table API methods directly to the table instance. Unlike row/cell/column/header, the table is a singleton so methods are assigned directly. diff --git a/docs/reference/functions/callMemoOrStaticFn.md b/docs/reference/functions/callMemoOrStaticFn.md index 88a7716149..0a527541c4 100644 --- a/docs/reference/functions/callMemoOrStaticFn.md +++ b/docs/reference/functions/callMemoOrStaticFn.md @@ -13,7 +13,7 @@ function callMemoOrStaticFn( args): ReturnType; ``` -Defined in: [utils.ts:387](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L387) +Defined in: [utils.ts:382](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L382) Looks to run the memoized function with the builder pattern on the object if it exists, otherwise fallback to the static method passed in. diff --git a/docs/reference/functions/cell_getContext.md b/docs/reference/functions/cell_getContext.md deleted file mode 100644 index 9a3c3f1594..0000000000 --- a/docs/reference/functions/cell_getContext.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -id: cell_getContext -title: cell_getContext ---- - -# Function: cell\_getContext() - -```ts -function cell_getContext(cell): object; -``` - -Defined in: [core/cells/coreCellsFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L21) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### cell - -[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`object` - -### cell - -```ts -cell: Cell; -``` - -### column - -```ts -column: Column = cell.column; -``` - -### getValue() - -```ts -getValue: () => NoInfer; -``` - -#### Returns - -[`NoInfer`](../type-aliases/NoInfer.md)\<`TValue`\> - -### renderValue() - -```ts -renderValue: () => NoInfer; -``` - -#### Returns - -[`NoInfer`](../type-aliases/NoInfer.md)\<`TValue` \| `null`\> - -### row - -```ts -row: Row = cell.row; -``` - -### table - -```ts -table: Table_Internal = cell.table; -``` diff --git a/docs/reference/functions/cell_getIsAggregated.md b/docs/reference/functions/cell_getIsAggregated.md deleted file mode 100644 index b1c0cb9dfa..0000000000 --- a/docs/reference/functions/cell_getIsAggregated.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: cell_getIsAggregated -title: cell_getIsAggregated ---- - -# Function: cell\_getIsAggregated() - -```ts -function cell_getIsAggregated(cell): boolean; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:182](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L182) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### cell - -[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/cell_getIsGrouped.md b/docs/reference/functions/cell_getIsGrouped.md deleted file mode 100644 index 206ec1acbd..0000000000 --- a/docs/reference/functions/cell_getIsGrouped.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: cell_getIsGrouped -title: cell_getIsGrouped ---- - -# Function: cell\_getIsGrouped() - -```ts -function cell_getIsGrouped(cell): boolean; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L163) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### cell - -[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/cell_getIsPlaceholder.md b/docs/reference/functions/cell_getIsPlaceholder.md deleted file mode 100644 index 6932090db9..0000000000 --- a/docs/reference/functions/cell_getIsPlaceholder.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: cell_getIsPlaceholder -title: cell_getIsPlaceholder ---- - -# Function: cell\_getIsPlaceholder() - -```ts -function cell_getIsPlaceholder(cell): boolean; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:174](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L174) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### cell - -[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/cell_getValue.md b/docs/reference/functions/cell_getValue.md deleted file mode 100644 index 21951dad30..0000000000 --- a/docs/reference/functions/cell_getValue.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: cell_getValue -title: cell_getValue ---- - -# Function: cell\_getValue() - -```ts -function cell_getValue(cell): TValue; -``` - -Defined in: [core/cells/coreCellsFeature.utils.ts:5](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L5) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### cell - -[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`TValue` diff --git a/docs/reference/functions/cell_renderValue.md b/docs/reference/functions/cell_renderValue.md deleted file mode 100644 index 00771496dd..0000000000 --- a/docs/reference/functions/cell_renderValue.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: cell_renderValue -title: cell_renderValue ---- - -# Function: cell\_renderValue() - -```ts -function cell_renderValue(cell): any; -``` - -Defined in: [core/cells/coreCellsFeature.utils.ts:13](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/cells/coreCellsFeature.utils.ts#L13) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### cell - -[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`any` diff --git a/docs/reference/functions/column_clearSorting.md b/docs/reference/functions/column_clearSorting.md deleted file mode 100644 index c9e1147818..0000000000 --- a/docs/reference/functions/column_clearSorting.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_clearSorting -title: column_clearSorting ---- - -# Function: column\_clearSorting() - -```ts -function column_clearSorting(column): void; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:290](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L290) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`void` diff --git a/docs/reference/functions/column_getAfter.md b/docs/reference/functions/column_getAfter.md deleted file mode 100644 index 7113e1b6ef..0000000000 --- a/docs/reference/functions/column_getAfter.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: column_getAfter -title: column_getAfter ---- - -# Function: column\_getAfter() - -```ts -function column_getAfter(column, position): number; -``` - -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L66) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -### position - -[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` - -## Returns - -`number` diff --git a/docs/reference/functions/column_getAggregationFn.md b/docs/reference/functions/column_getAggregationFn.md deleted file mode 100644 index fe15ad30f0..0000000000 --- a/docs/reference/functions/column_getAggregationFn.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -id: column_getAggregationFn -title: column_getAggregationFn ---- - -# Function: column\_getAggregationFn() - -```ts -function column_getAggregationFn(column): - | AggregationFn - | undefined; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:97](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L97) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - - \| [`AggregationFn`](../type-aliases/AggregationFn.md)\<`TFeatures`, `TData`\> - \| `undefined` diff --git a/docs/reference/functions/column_getAutoAggregationFn.md b/docs/reference/functions/column_getAutoAggregationFn.md deleted file mode 100644 index 2e87a647f3..0000000000 --- a/docs/reference/functions/column_getAutoAggregationFn.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -id: column_getAutoAggregationFn -title: column_getAutoAggregationFn ---- - -# Function: column\_getAutoAggregationFn() - -```ts -function column_getAutoAggregationFn(column): - | AggregationFn - | undefined; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L75) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - - \| [`AggregationFn`](../type-aliases/AggregationFn.md)\<`TFeatures`, `TData`\> - \| `undefined` diff --git a/docs/reference/functions/column_getAutoFilterFn.md b/docs/reference/functions/column_getAutoFilterFn.md deleted file mode 100644 index d0e91aca07..0000000000 --- a/docs/reference/functions/column_getAutoFilterFn.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -id: column_getAutoFilterFn -title: column_getAutoFilterFn ---- - -# Function: column\_getAutoFilterFn() - -```ts -function column_getAutoFilterFn(column): - | FilterFn - | undefined; -``` - -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L15) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - - \| [`FilterFn`](../interfaces/FilterFn.md)\<`TFeatures`, `TData`\> - \| `undefined` diff --git a/docs/reference/functions/column_getAutoSortDir.md b/docs/reference/functions/column_getAutoSortDir.md deleted file mode 100644 index aa1a74d370..0000000000 --- a/docs/reference/functions/column_getAutoSortDir.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getAutoSortDir -title: column_getAutoSortDir ---- - -# Function: column\_getAutoSortDir() - -```ts -function column_getAutoSortDir(column): "asc" | "desc"; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L76) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`"asc"` \| `"desc"` diff --git a/docs/reference/functions/column_getAutoSortFn.md b/docs/reference/functions/column_getAutoSortFn.md deleted file mode 100644 index 526f4bf412..0000000000 --- a/docs/reference/functions/column_getAutoSortFn.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getAutoSortFn -title: column_getAutoSortFn ---- - -# Function: column\_getAutoSortFn() - -```ts -function column_getAutoSortFn(column): SortFn; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L38) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -[`SortFn`](../interfaces/SortFn.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/column_getCanFilter.md b/docs/reference/functions/column_getCanFilter.md deleted file mode 100644 index 60fd8ee0cb..0000000000 --- a/docs/reference/functions/column_getCanFilter.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getCanFilter -title: column_getCanFilter ---- - -# Function: column\_getCanFilter() - -```ts -function column_getCanFilter(column): boolean; -``` - -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L77) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/column_getCanGlobalFilter.md b/docs/reference/functions/column_getCanGlobalFilter.md deleted file mode 100644 index 2b7becd5c5..0000000000 --- a/docs/reference/functions/column_getCanGlobalFilter.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getCanGlobalFilter -title: column_getCanGlobalFilter ---- - -# Function: column\_getCanGlobalFilter() - -```ts -function column_getCanGlobalFilter(column): boolean; -``` - -Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L9) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/column_getCanGroup.md b/docs/reference/functions/column_getCanGroup.md deleted file mode 100644 index 4e9522305f..0000000000 --- a/docs/reference/functions/column_getCanGroup.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getCanGroup -title: column_getCanGroup ---- - -# Function: column\_getCanGroup() - -```ts -function column_getCanGroup(column): boolean; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L34) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/column_getCanHide.md b/docs/reference/functions/column_getCanHide.md deleted file mode 100644 index 8225ced472..0000000000 --- a/docs/reference/functions/column_getCanHide.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getCanHide -title: column_getCanHide ---- - -# Function: column\_getCanHide() - -```ts -function column_getCanHide(column): boolean; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:44](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L44) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/column_getCanMultiSort.md b/docs/reference/functions/column_getCanMultiSort.md deleted file mode 100644 index 0aa5fb4b53..0000000000 --- a/docs/reference/functions/column_getCanMultiSort.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getCanMultiSort -title: column_getCanMultiSort ---- - -# Function: column\_getCanMultiSort() - -```ts -function column_getCanMultiSort(column): boolean; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:257](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L257) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/column_getCanPin.md b/docs/reference/functions/column_getCanPin.md deleted file mode 100644 index 119086322e..0000000000 --- a/docs/reference/functions/column_getCanPin.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getCanPin -title: column_getCanPin ---- - -# Function: column\_getCanPin() - -```ts -function column_getCanPin(column): boolean; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L69) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/column_getCanResize.md b/docs/reference/functions/column_getCanResize.md deleted file mode 100644 index 0f4216e4b4..0000000000 --- a/docs/reference/functions/column_getCanResize.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getCanResize -title: column_getCanResize ---- - -# Function: column\_getCanResize() - -```ts -function column_getCanResize(column): boolean; -``` - -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L26) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/column_getCanSort.md b/docs/reference/functions/column_getCanSort.md deleted file mode 100644 index 3757e5b19e..0000000000 --- a/docs/reference/functions/column_getCanSort.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getCanSort -title: column_getCanSort ---- - -# Function: column\_getCanSort() - -```ts -function column_getCanSort(column): boolean; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:245](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L245) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/column_getFacetedMinMaxValues.md b/docs/reference/functions/column_getFacetedMinMaxValues.md deleted file mode 100644 index b48e87a990..0000000000 --- a/docs/reference/functions/column_getFacetedMinMaxValues.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: column_getFacetedMinMaxValues -title: column_getFacetedMinMaxValues ---- - -# Function: column\_getFacetedMinMaxValues() - -```ts -function column_getFacetedMinMaxValues(column, table): [number, number] | undefined; -``` - -Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L7) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -\[`number`, `number`\] \| `undefined` diff --git a/docs/reference/functions/column_getFacetedRowModel.md b/docs/reference/functions/column_getFacetedRowModel.md deleted file mode 100644 index 850244c3a6..0000000000 --- a/docs/reference/functions/column_getFacetedRowModel.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: column_getFacetedRowModel -title: column_getFacetedRowModel ---- - -# Function: column\_getFacetedRowModel() - -```ts -function column_getFacetedRowModel(column, table): RowModel; -``` - -Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L21) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> | `undefined` - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/column_getFacetedUniqueValues.md b/docs/reference/functions/column_getFacetedUniqueValues.md deleted file mode 100644 index 60a3e97389..0000000000 --- a/docs/reference/functions/column_getFacetedUniqueValues.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: column_getFacetedUniqueValues -title: column_getFacetedUniqueValues ---- - -# Function: column\_getFacetedUniqueValues() - -```ts -function column_getFacetedUniqueValues(column, table): Map; -``` - -Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L35) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`Map`\<`any`, `number`\> diff --git a/docs/reference/functions/column_getFilterFn.md b/docs/reference/functions/column_getFilterFn.md deleted file mode 100644 index f44c1bedfc..0000000000 --- a/docs/reference/functions/column_getFilterFn.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -id: column_getFilterFn -title: column_getFilterFn ---- - -# Function: column\_getFilterFn() - -```ts -function column_getFilterFn(column): - | FilterFn - | undefined; -``` - -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:51](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L51) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - - \| [`FilterFn`](../interfaces/FilterFn.md)\<`TFeatures`, `TData`\> - \| `undefined` diff --git a/docs/reference/functions/column_getFilterIndex.md b/docs/reference/functions/column_getFilterIndex.md deleted file mode 100644 index 838a6a1630..0000000000 --- a/docs/reference/functions/column_getFilterIndex.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getFilterIndex -title: column_getFilterIndex ---- - -# Function: column\_getFilterIndex() - -```ts -function column_getFilterIndex(column): number; -``` - -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:107](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L107) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`number` diff --git a/docs/reference/functions/column_getFilterValue.md b/docs/reference/functions/column_getFilterValue.md deleted file mode 100644 index a9725f7900..0000000000 --- a/docs/reference/functions/column_getFilterValue.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getFilterValue -title: column_getFilterValue ---- - -# Function: column\_getFilterValue() - -```ts -function column_getFilterValue(column): unknown; -``` - -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L98) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`unknown` diff --git a/docs/reference/functions/column_getFirstSortDir.md b/docs/reference/functions/column_getFirstSortDir.md deleted file mode 100644 index f99169329b..0000000000 --- a/docs/reference/functions/column_getFirstSortDir.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getFirstSortDir -title: column_getFirstSortDir ---- - -# Function: column\_getFirstSortDir() - -```ts -function column_getFirstSortDir(column): "asc" | "desc"; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:211](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L211) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`"asc"` \| `"desc"` diff --git a/docs/reference/functions/column_getFlatColumns.md b/docs/reference/functions/column_getFlatColumns.md deleted file mode 100644 index 36bf4e8720..0000000000 --- a/docs/reference/functions/column_getFlatColumns.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getFlatColumns -title: column_getFlatColumns ---- - -# Function: column\_getFlatColumns() - -```ts -function column_getFlatColumns(column): Column[]; -``` - -Defined in: [core/columns/coreColumnsFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L14) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\>[] diff --git a/docs/reference/functions/column_getGroupedIndex.md b/docs/reference/functions/column_getGroupedIndex.md deleted file mode 100644 index 8e4305ce24..0000000000 --- a/docs/reference/functions/column_getGroupedIndex.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getGroupedIndex -title: column_getGroupedIndex ---- - -# Function: column\_getGroupedIndex() - -```ts -function column_getGroupedIndex(column): number; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L54) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`number` diff --git a/docs/reference/functions/column_getIndex.md b/docs/reference/functions/column_getIndex.md deleted file mode 100644 index 7d62bfcf53..0000000000 --- a/docs/reference/functions/column_getIndex.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: column_getIndex -title: column_getIndex ---- - -# Function: column\_getIndex() - -```ts -function column_getIndex(column, position?): number; -``` - -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L14) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -### position? - -[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` - -## Returns - -`number` diff --git a/docs/reference/functions/column_getIsFiltered.md b/docs/reference/functions/column_getIsFiltered.md deleted file mode 100644 index b683e226e0..0000000000 --- a/docs/reference/functions/column_getIsFiltered.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getIsFiltered -title: column_getIsFiltered ---- - -# Function: column\_getIsFiltered() - -```ts -function column_getIsFiltered(column): boolean; -``` - -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L90) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/column_getIsFirstColumn.md b/docs/reference/functions/column_getIsFirstColumn.md deleted file mode 100644 index e3930acb51..0000000000 --- a/docs/reference/functions/column_getIsFirstColumn.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: column_getIsFirstColumn -title: column_getIsFirstColumn ---- - -# Function: column\_getIsFirstColumn() - -```ts -function column_getIsFirstColumn(column, position?): boolean; -``` - -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L26) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -### position? - -[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` - -## Returns - -`boolean` diff --git a/docs/reference/functions/column_getIsGrouped.md b/docs/reference/functions/column_getIsGrouped.md deleted file mode 100644 index 4a504e4840..0000000000 --- a/docs/reference/functions/column_getIsGrouped.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getIsGrouped -title: column_getIsGrouped ---- - -# Function: column\_getIsGrouped() - -```ts -function column_getIsGrouped(column): boolean; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L46) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/column_getIsLastColumn.md b/docs/reference/functions/column_getIsLastColumn.md deleted file mode 100644 index 94c37f255f..0000000000 --- a/docs/reference/functions/column_getIsLastColumn.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: column_getIsLastColumn -title: column_getIsLastColumn ---- - -# Function: column\_getIsLastColumn() - -```ts -function column_getIsLastColumn(column, position?): boolean; -``` - -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:38](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L38) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -### position? - -[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` - -## Returns - -`boolean` diff --git a/docs/reference/functions/column_getIsPinned.md b/docs/reference/functions/column_getIsPinned.md deleted file mode 100644 index f53c19455c..0000000000 --- a/docs/reference/functions/column_getIsPinned.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getIsPinned -title: column_getIsPinned ---- - -# Function: column\_getIsPinned() - -```ts -function column_getIsPinned(column): ColumnPinningPosition; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L85) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) diff --git a/docs/reference/functions/column_getIsResizing.md b/docs/reference/functions/column_getIsResizing.md deleted file mode 100644 index b4492cd782..0000000000 --- a/docs/reference/functions/column_getIsResizing.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getIsResizing -title: column_getIsResizing ---- - -# Function: column\_getIsResizing() - -```ts -function column_getIsResizing(column): boolean; -``` - -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L37) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/column_getIsSorted.md b/docs/reference/functions/column_getIsSorted.md deleted file mode 100644 index db76a9a73c..0000000000 --- a/docs/reference/functions/column_getIsSorted.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getIsSorted -title: column_getIsSorted ---- - -# Function: column\_getIsSorted() - -```ts -function column_getIsSorted(column): false | SortDirection; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:269](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L269) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`false` \| [`SortDirection`](../type-aliases/SortDirection.md) diff --git a/docs/reference/functions/column_getIsVisible.md b/docs/reference/functions/column_getIsVisible.md deleted file mode 100644 index 499c9b2b1c..0000000000 --- a/docs/reference/functions/column_getIsVisible.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getIsVisible -title: column_getIsVisible ---- - -# Function: column\_getIsVisible() - -```ts -function column_getIsVisible(column): boolean; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L29) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/column_getLeafColumns.md b/docs/reference/functions/column_getLeafColumns.md deleted file mode 100644 index 6e4c0d4785..0000000000 --- a/docs/reference/functions/column_getLeafColumns.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getLeafColumns -title: column_getLeafColumns ---- - -# Function: column\_getLeafColumns() - -```ts -function column_getLeafColumns(column): Column[]; -``` - -Defined in: [core/columns/coreColumnsFeature.utils.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L24) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `TValue`\>[] diff --git a/docs/reference/functions/column_getNextSortingOrder.md b/docs/reference/functions/column_getNextSortingOrder.md deleted file mode 100644 index 984bf4b472..0000000000 --- a/docs/reference/functions/column_getNextSortingOrder.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: column_getNextSortingOrder -title: column_getNextSortingOrder ---- - -# Function: column\_getNextSortingOrder() - -```ts -function column_getNextSortingOrder(column, multi?): false | "asc" | "desc"; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:223](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L223) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -### multi? - -`boolean` - -## Returns - -`false` \| `"asc"` \| `"desc"` diff --git a/docs/reference/functions/column_getPinnedIndex.md b/docs/reference/functions/column_getPinnedIndex.md deleted file mode 100644 index 4be1704553..0000000000 --- a/docs/reference/functions/column_getPinnedIndex.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getPinnedIndex -title: column_getPinnedIndex ---- - -# Function: column\_getPinnedIndex() - -```ts -function column_getPinnedIndex(column): number; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:103](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L103) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`number` diff --git a/docs/reference/functions/column_getSize.md b/docs/reference/functions/column_getSize.md deleted file mode 100644 index 4dd6ab902e..0000000000 --- a/docs/reference/functions/column_getSize.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getSize -title: column_getSize ---- - -# Function: column\_getSize() - -```ts -function column_getSize(column): number; -``` - -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L29) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`number` diff --git a/docs/reference/functions/column_getSortFn.md b/docs/reference/functions/column_getSortFn.md deleted file mode 100644 index 2ad1198852..0000000000 --- a/docs/reference/functions/column_getSortFn.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getSortFn -title: column_getSortFn ---- - -# Function: column\_getSortFn() - -```ts -function column_getSortFn(column): SortFn; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L92) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -[`SortFn`](../interfaces/SortFn.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/column_getSortIndex.md b/docs/reference/functions/column_getSortIndex.md deleted file mode 100644 index c7c8807971..0000000000 --- a/docs/reference/functions/column_getSortIndex.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_getSortIndex -title: column_getSortIndex ---- - -# Function: column\_getSortIndex() - -```ts -function column_getSortIndex(column): number; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:280](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L280) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`number` diff --git a/docs/reference/functions/column_getStart.md b/docs/reference/functions/column_getStart.md deleted file mode 100644 index 591c0cb885..0000000000 --- a/docs/reference/functions/column_getStart.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: column_getStart -title: column_getStart ---- - -# Function: column\_getStart() - -```ts -function column_getStart(column, position): number; -``` - -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L46) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -### position - -[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` - -## Returns - -`number` diff --git a/docs/reference/functions/column_getToggleGroupingHandler.md b/docs/reference/functions/column_getToggleGroupingHandler.md deleted file mode 100644 index d3da4ab9ec..0000000000 --- a/docs/reference/functions/column_getToggleGroupingHandler.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -id: column_getToggleGroupingHandler -title: column_getToggleGroupingHandler ---- - -# Function: column\_getToggleGroupingHandler() - -```ts -function column_getToggleGroupingHandler(column): () => void; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L62) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -```ts -(): void; -``` - -### Returns - -`void` diff --git a/docs/reference/functions/column_getToggleSortingHandler.md b/docs/reference/functions/column_getToggleSortingHandler.md deleted file mode 100644 index 96319ac168..0000000000 --- a/docs/reference/functions/column_getToggleSortingHandler.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -id: column_getToggleSortingHandler -title: column_getToggleSortingHandler ---- - -# Function: column\_getToggleSortingHandler() - -```ts -function column_getToggleSortingHandler(column): (e) => void; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:301](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L301) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -```ts -(e): void; -``` - -### Parameters - -#### e - -`unknown` - -### Returns - -`void` diff --git a/docs/reference/functions/column_getToggleVisibilityHandler.md b/docs/reference/functions/column_getToggleVisibilityHandler.md deleted file mode 100644 index e1e4e2d134..0000000000 --- a/docs/reference/functions/column_getToggleVisibilityHandler.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -id: column_getToggleVisibilityHandler -title: column_getToggleVisibilityHandler ---- - -# Function: column\_getToggleVisibilityHandler() - -```ts -function column_getToggleVisibilityHandler(column): (e) => void; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L55) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -```ts -(e): void; -``` - -### Parameters - -#### e - -`unknown` - -### Returns - -`void` diff --git a/docs/reference/functions/column_pin.md b/docs/reference/functions/column_pin.md deleted file mode 100644 index e3842b67be..0000000000 --- a/docs/reference/functions/column_pin.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: column_pin -title: column_pin ---- - -# Function: column\_pin() - -```ts -function column_pin(column, position): void; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L31) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -### position - -[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) - -## Returns - -`void` diff --git a/docs/reference/functions/column_resetSize.md b/docs/reference/functions/column_resetSize.md deleted file mode 100644 index 0ef587d646..0000000000 --- a/docs/reference/functions/column_resetSize.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_resetSize -title: column_resetSize ---- - -# Function: column\_resetSize() - -```ts -function column_resetSize(column): void; -``` - -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L88) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`void` diff --git a/docs/reference/functions/column_setFilterValue.md b/docs/reference/functions/column_setFilterValue.md deleted file mode 100644 index b5bdc46725..0000000000 --- a/docs/reference/functions/column_setFilterValue.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: column_setFilterValue -title: column_setFilterValue ---- - -# Function: column\_setFilterValue() - -```ts -function column_setFilterValue(column, value): void; -``` - -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L119) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -### value - -`any` - -## Returns - -`void` diff --git a/docs/reference/functions/column_toggleGrouping.md b/docs/reference/functions/column_toggleGrouping.md deleted file mode 100644 index 1dfad1a5d9..0000000000 --- a/docs/reference/functions/column_toggleGrouping.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: column_toggleGrouping -title: column_toggleGrouping ---- - -# Function: column\_toggleGrouping() - -```ts -function column_toggleGrouping(column): void; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L19) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`void` diff --git a/docs/reference/functions/column_toggleSorting.md b/docs/reference/functions/column_toggleSorting.md deleted file mode 100644 index ca74d949b7..0000000000 --- a/docs/reference/functions/column_toggleSorting.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -id: column_toggleSorting -title: column_toggleSorting ---- - -# Function: column\_toggleSorting() - -```ts -function column_toggleSorting( - column, - desc?, - multi?): void; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L108) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -### desc? - -`boolean` - -### multi? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/column_toggleVisibility.md b/docs/reference/functions/column_toggleVisibility.md deleted file mode 100644 index fff5b680a6..0000000000 --- a/docs/reference/functions/column_toggleVisibility.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: column_toggleVisibility -title: column_toggleVisibility ---- - -# Function: column\_toggleVisibility() - -```ts -function column_toggleVisibility(column, visible?): void; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L14) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### column - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -### visible? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/constructTable.md b/docs/reference/functions/constructTable.md index 3a16ec869b..15186cd742 100644 --- a/docs/reference/functions/constructTable.md +++ b/docs/reference/functions/constructTable.md @@ -9,7 +9,7 @@ title: constructTable function constructTable(tableOptions): Table; ``` -Defined in: [core/table/constructTable.ts:29](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/constructTable.ts#L29) +Defined in: [core/table/constructTable.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/constructTable.ts#L22) ## Type Parameters diff --git a/docs/reference/functions/createTableStore.md b/docs/reference/functions/createTableStore.md deleted file mode 100644 index 28730f2a8c..0000000000 --- a/docs/reference/functions/createTableStore.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: createTableStore -title: createTableStore ---- - -# Function: createTableStore() - -```ts -function createTableStore(features, initialState): Store>; -``` - -Defined in: [core/table/constructTable.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/constructTable.ts#L22) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -## Parameters - -### features - -`TFeatures` - -### initialState - -`Partial`\<[`TableState`](../type-aliases/TableState.md)\<`TFeatures`\>\> | `undefined` - -## Returns - -`Store`\<[`TableState`](../type-aliases/TableState.md)\<`TFeatures`\>\> diff --git a/docs/reference/functions/flattenBy.md b/docs/reference/functions/flattenBy.md index 0478469106..fc07eb7f0c 100644 --- a/docs/reference/functions/flattenBy.md +++ b/docs/reference/functions/flattenBy.md @@ -9,7 +9,7 @@ title: flattenBy function flattenBy(arr, getChildren): TNode[]; ``` -Defined in: [utils.ts:40](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L40) +Defined in: [utils.ts:35](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L35) ## Type Parameters diff --git a/docs/reference/functions/getDefaultColumnFiltersState.md b/docs/reference/functions/getDefaultColumnFiltersState.md deleted file mode 100644 index 01cd6bf425..0000000000 --- a/docs/reference/functions/getDefaultColumnFiltersState.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: getDefaultColumnFiltersState -title: getDefaultColumnFiltersState ---- - -# Function: getDefaultColumnFiltersState() - -```ts -function getDefaultColumnFiltersState(): ColumnFiltersState; -``` - -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:11](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L11) - -## Returns - -[`ColumnFiltersState`](../type-aliases/ColumnFiltersState.md) diff --git a/docs/reference/functions/getDefaultColumnOrderState.md b/docs/reference/functions/getDefaultColumnOrderState.md deleted file mode 100644 index 76b6641d97..0000000000 --- a/docs/reference/functions/getDefaultColumnOrderState.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: getDefaultColumnOrderState -title: getDefaultColumnOrderState ---- - -# Function: getDefaultColumnOrderState() - -```ts -function getDefaultColumnOrderState(): ColumnOrderState; -``` - -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L10) - -## Returns - -[`ColumnOrderState`](../type-aliases/ColumnOrderState.md) diff --git a/docs/reference/functions/getDefaultColumnPinningState.md b/docs/reference/functions/getDefaultColumnPinningState.md deleted file mode 100644 index 17dff16c53..0000000000 --- a/docs/reference/functions/getDefaultColumnPinningState.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: getDefaultColumnPinningState -title: getDefaultColumnPinningState ---- - -# Function: getDefaultColumnPinningState() - -```ts -function getDefaultColumnPinningState(): ColumnPinningState; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L22) - -## Returns - -[`ColumnPinningState`](../interfaces/ColumnPinningState.md) diff --git a/docs/reference/functions/getDefaultColumnResizingState.md b/docs/reference/functions/getDefaultColumnResizingState.md deleted file mode 100644 index aa88930a90..0000000000 --- a/docs/reference/functions/getDefaultColumnResizingState.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: getDefaultColumnResizingState -title: getDefaultColumnResizingState ---- - -# Function: getDefaultColumnResizingState() - -```ts -function getDefaultColumnResizingState(): columnResizingState; -``` - -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L15) - -## Returns - -[`columnResizingState`](../interfaces/columnResizingState.md) diff --git a/docs/reference/functions/getDefaultColumnSizingColumnDef.md b/docs/reference/functions/getDefaultColumnSizingColumnDef.md deleted file mode 100644 index 89daefd5e6..0000000000 --- a/docs/reference/functions/getDefaultColumnSizingColumnDef.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -id: getDefaultColumnSizingColumnDef -title: getDefaultColumnSizingColumnDef ---- - -# Function: getDefaultColumnSizingColumnDef() - -```ts -function getDefaultColumnSizingColumnDef(): object; -``` - -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L21) - -## Returns - -`object` - -### maxSize - -```ts -maxSize: number = Number.MAX_SAFE_INTEGER; -``` - -### minSize - -```ts -minSize: number = 20; -``` - -### size - -```ts -size: number = 150; -``` diff --git a/docs/reference/functions/getDefaultColumnSizingState.md b/docs/reference/functions/getDefaultColumnSizingState.md deleted file mode 100644 index 7ffe17d73d..0000000000 --- a/docs/reference/functions/getDefaultColumnSizingState.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: getDefaultColumnSizingState -title: getDefaultColumnSizingState ---- - -# Function: getDefaultColumnSizingState() - -```ts -function getDefaultColumnSizingState(): ColumnSizingState; -``` - -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L17) - -## Returns - -[`ColumnSizingState`](../type-aliases/ColumnSizingState.md) diff --git a/docs/reference/functions/getDefaultColumnVisibilityState.md b/docs/reference/functions/getDefaultColumnVisibilityState.md deleted file mode 100644 index dda4416fdc..0000000000 --- a/docs/reference/functions/getDefaultColumnVisibilityState.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: getDefaultColumnVisibilityState -title: getDefaultColumnVisibilityState ---- - -# Function: getDefaultColumnVisibilityState() - -```ts -function getDefaultColumnVisibilityState(): ColumnVisibilityState; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L10) - -## Returns - -[`ColumnVisibilityState`](../type-aliases/ColumnVisibilityState.md) diff --git a/docs/reference/functions/getDefaultExpandedState.md b/docs/reference/functions/getDefaultExpandedState.md deleted file mode 100644 index 3eb177b31d..0000000000 --- a/docs/reference/functions/getDefaultExpandedState.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: getDefaultExpandedState -title: getDefaultExpandedState ---- - -# Function: getDefaultExpandedState() - -```ts -function getDefaultExpandedState(): ExpandedState; -``` - -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L10) - -## Returns - -[`ExpandedState`](../type-aliases/ExpandedState.md) diff --git a/docs/reference/functions/getDefaultGroupingState.md b/docs/reference/functions/getDefaultGroupingState.md deleted file mode 100644 index 213ac83cca..0000000000 --- a/docs/reference/functions/getDefaultGroupingState.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: getDefaultGroupingState -title: getDefaultGroupingState ---- - -# Function: getDefaultGroupingState() - -```ts -function getDefaultGroupingState(): GroupingState; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L15) - -## Returns - -[`GroupingState`](../type-aliases/GroupingState.md) diff --git a/docs/reference/functions/getDefaultPaginationState.md b/docs/reference/functions/getDefaultPaginationState.md deleted file mode 100644 index 8701d43269..0000000000 --- a/docs/reference/functions/getDefaultPaginationState.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: getDefaultPaginationState -title: getDefaultPaginationState ---- - -# Function: getDefaultPaginationState() - -```ts -function getDefaultPaginationState(): PaginationState; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L10) - -## Returns - -[`PaginationState`](../interfaces/PaginationState.md) diff --git a/docs/reference/functions/getDefaultRowPinningState.md b/docs/reference/functions/getDefaultRowPinningState.md deleted file mode 100644 index 3470248367..0000000000 --- a/docs/reference/functions/getDefaultRowPinningState.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: getDefaultRowPinningState -title: getDefaultRowPinningState ---- - -# Function: getDefaultRowPinningState() - -```ts -function getDefaultRowPinningState(): RowPinningState; -``` - -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L14) - -## Returns - -[`RowPinningState`](../interfaces/RowPinningState.md) diff --git a/docs/reference/functions/getDefaultRowSelectionState.md b/docs/reference/functions/getDefaultRowSelectionState.md deleted file mode 100644 index 8e2dfaf0b7..0000000000 --- a/docs/reference/functions/getDefaultRowSelectionState.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: getDefaultRowSelectionState -title: getDefaultRowSelectionState ---- - -# Function: getDefaultRowSelectionState() - -```ts -function getDefaultRowSelectionState(): RowSelectionState; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:10](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L10) - -## Returns - -[`RowSelectionState`](../type-aliases/RowSelectionState.md) diff --git a/docs/reference/functions/getDefaultSortingState.md b/docs/reference/functions/getDefaultSortingState.md deleted file mode 100644 index cb57d4e9df..0000000000 --- a/docs/reference/functions/getDefaultSortingState.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: getDefaultSortingState -title: getDefaultSortingState ---- - -# Function: getDefaultSortingState() - -```ts -function getDefaultSortingState(): SortingState; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L15) - -## Returns - -[`SortingState`](../type-aliases/SortingState.md) diff --git a/docs/reference/functions/getFunctionNameInfo.md b/docs/reference/functions/getFunctionNameInfo.md index 86768a0ae6..7f1b1d3f0f 100644 --- a/docs/reference/functions/getFunctionNameInfo.md +++ b/docs/reference/functions/getFunctionNameInfo.md @@ -9,7 +9,7 @@ title: getFunctionNameInfo function getFunctionNameInfo(staticFnName, splitBy): object; ``` -Defined in: [utils.ts:280](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L280) +Defined in: [utils.ts:275](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L275) Assumes that a function name is in the format of `parentName_fnKey` and returns the `fnKey` and `fnName` in the format of `parentName.fnKey`. diff --git a/docs/reference/functions/getMemoFnMeta.md b/docs/reference/functions/getMemoFnMeta.md index d8555afd30..d4850715bf 100644 --- a/docs/reference/functions/getMemoFnMeta.md +++ b/docs/reference/functions/getMemoFnMeta.md @@ -9,7 +9,7 @@ title: getMemoFnMeta function getMemoFnMeta(fn): MemoFnMeta | null; ``` -Defined in: [utils.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L74) +Defined in: [utils.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L69) **`Internal`** diff --git a/docs/reference/functions/header_getContext.md b/docs/reference/functions/header_getContext.md deleted file mode 100644 index 3642011124..0000000000 --- a/docs/reference/functions/header_getContext.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -id: header_getContext -title: header_getContext ---- - -# Function: header\_getContext() - -```ts -function header_getContext(header): object; -``` - -Defined in: [core/headers/coreHeadersFeature.utils.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L36) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` - -## Parameters - -### header - -[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`object` - -### column - -```ts -column: Column = header.column; -``` - -### header - -```ts -header: Header; -``` - -### table - -```ts -table: Table_Internal = header.column.table; -``` diff --git a/docs/reference/functions/header_getLeafHeaders.md b/docs/reference/functions/header_getLeafHeaders.md deleted file mode 100644 index 1ae9df99f7..0000000000 --- a/docs/reference/functions/header_getLeafHeaders.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: header_getLeafHeaders -title: header_getLeafHeaders ---- - -# Function: header\_getLeafHeaders() - -```ts -function header_getLeafHeaders(header): Header[]; -``` - -Defined in: [core/headers/coreHeadersFeature.utils.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L17) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` - -## Parameters - -### header - -[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\>[] diff --git a/docs/reference/functions/header_getResizeHandler.md b/docs/reference/functions/header_getResizeHandler.md deleted file mode 100644 index fd49eaf3e8..0000000000 --- a/docs/reference/functions/header_getResizeHandler.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: header_getResizeHandler -title: header_getResizeHandler ---- - -# Function: header\_getResizeHandler() - -```ts -function header_getResizeHandler(header, _contextDocument?): (event) => void; -``` - -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L45) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### header - -[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\> - -### \_contextDocument? - -`Document` - -## Returns - -```ts -(event): void; -``` - -### Parameters - -#### event - -`unknown` - -### Returns - -`void` diff --git a/docs/reference/functions/header_getSize.md b/docs/reference/functions/header_getSize.md deleted file mode 100644 index 6cd56d16a2..0000000000 --- a/docs/reference/functions/header_getSize.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: header_getSize -title: header_getSize ---- - -# Function: header\_getSize() - -```ts -function header_getSize(header): number; -``` - -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L98) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### header - -[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`number` diff --git a/docs/reference/functions/header_getStart.md b/docs/reference/functions/header_getStart.md deleted file mode 100644 index 7ffb78b071..0000000000 --- a/docs/reference/functions/header_getStart.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: header_getStart -title: header_getStart ---- - -# Function: header\_getStart() - -```ts -function header_getStart(header): number; -``` - -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L118) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### header - -[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`number` diff --git a/docs/reference/functions/isFunction.md b/docs/reference/functions/isFunction.md index 2de56b4337..19d4f46e30 100644 --- a/docs/reference/functions/isFunction.md +++ b/docs/reference/functions/isFunction.md @@ -9,7 +9,7 @@ title: isFunction function isFunction(d): d is T; ``` -Defined in: [utils.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L32) +Defined in: [utils.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L27) ## Type Parameters diff --git a/docs/reference/functions/isNumberArray.md b/docs/reference/functions/isNumberArray.md index c40d3d1d87..ed29a2bb9a 100644 --- a/docs/reference/functions/isNumberArray.md +++ b/docs/reference/functions/isNumberArray.md @@ -9,7 +9,7 @@ title: isNumberArray function isNumberArray(d): d is number[]; ``` -Defined in: [utils.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L36) +Defined in: [utils.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L31) ## Parameters diff --git a/docs/reference/functions/isRowSelected.md b/docs/reference/functions/isRowSelected.md deleted file mode 100644 index f63371fdd5..0000000000 --- a/docs/reference/functions/isRowSelected.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: isRowSelected -title: isRowSelected ---- - -# Function: isRowSelected() - -```ts -function isRowSelected(row): boolean; -``` - -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) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/isSubRowSelected.md b/docs/reference/functions/isSubRowSelected.md deleted file mode 100644 index cd15f28eb9..0000000000 --- a/docs/reference/functions/isSubRowSelected.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: isSubRowSelected -title: isSubRowSelected ---- - -# Function: isSubRowSelected() - -```ts -function isSubRowSelected(row): boolean | "some" | "all"; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:425](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L425) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` \| `"some"` \| `"all"` diff --git a/docs/reference/functions/isTouchStartEvent.md b/docs/reference/functions/isTouchStartEvent.md deleted file mode 100644 index ecfa1f4175..0000000000 --- a/docs/reference/functions/isTouchStartEvent.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -id: isTouchStartEvent -title: isTouchStartEvent ---- - -# Function: isTouchStartEvent() - -```ts -function isTouchStartEvent(e): e is TouchEvent; -``` - -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:269](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L269) - -## Parameters - -### e - -`unknown` - -## Returns - -`e is TouchEvent` diff --git a/docs/reference/functions/memo.md b/docs/reference/functions/memo.md index 4ec5151291..45421faa13 100644 --- a/docs/reference/functions/memo.md +++ b/docs/reference/functions/memo.md @@ -9,7 +9,7 @@ title: memo function memo(__namedParameters): (depArgs?) => TResult; ``` -Defined in: [utils.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L87) +Defined in: [utils.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L82) ## Type Parameters diff --git a/docs/reference/functions/orderColumns.md b/docs/reference/functions/orderColumns.md deleted file mode 100644 index 44184f7c07..0000000000 --- a/docs/reference/functions/orderColumns.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: orderColumns -title: orderColumns ---- - -# Function: orderColumns() - -```ts -function orderColumns(table, leafColumns): Column_Internal[]; -``` - -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L106) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### leafColumns - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `unknown`\>[] - -## Returns - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/passiveEventSupported.md b/docs/reference/functions/passiveEventSupported.md deleted file mode 100644 index 52ba9a77d4..0000000000 --- a/docs/reference/functions/passiveEventSupported.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: passiveEventSupported -title: passiveEventSupported ---- - -# Function: passiveEventSupported() - -```ts -function passiveEventSupported(): boolean; -``` - -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:244](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L244) - -## Returns - -`boolean` diff --git a/docs/reference/functions/row_getAllCells.md b/docs/reference/functions/row_getAllCells.md deleted file mode 100644 index 7261297c27..0000000000 --- a/docs/reference/functions/row_getAllCells.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getAllCells -title: row_getAllCells ---- - -# Function: row\_getAllCells() - -```ts -function row_getAllCells(row): Cell[]; -``` - -Defined in: [core/rows/coreRowsFeature.utils.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L92) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/row_getAllCellsByColumnId.md b/docs/reference/functions/row_getAllCellsByColumnId.md deleted file mode 100644 index 55d8cf2532..0000000000 --- a/docs/reference/functions/row_getAllCellsByColumnId.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getAllCellsByColumnId -title: row_getAllCellsByColumnId ---- - -# Function: row\_getAllCellsByColumnId() - -```ts -function row_getAllCellsByColumnId(row): Record>; -``` - -Defined in: [core/rows/coreRowsFeature.utils.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L101) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`Record`\<`string`, [`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>\> diff --git a/docs/reference/functions/row_getAllVisibleCells.md b/docs/reference/functions/row_getAllVisibleCells.md deleted file mode 100644 index 2bfb23159a..0000000000 --- a/docs/reference/functions/row_getAllVisibleCells.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getAllVisibleCells -title: row_getAllVisibleCells ---- - -# Function: row\_getAllVisibleCells() - -```ts -function row_getAllVisibleCells(row): Cell[]; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L68) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/row_getCanExpand.md b/docs/reference/functions/row_getCanExpand.md deleted file mode 100644 index 3f3bc7f149..0000000000 --- a/docs/reference/functions/row_getCanExpand.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getCanExpand -title: row_getCanExpand ---- - -# Function: row\_getCanExpand() - -```ts -function row_getCanExpand(row): boolean; -``` - -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:172](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L172) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/row_getCanMultiSelect.md b/docs/reference/functions/row_getCanMultiSelect.md deleted file mode 100644 index 8c085c1655..0000000000 --- a/docs/reference/functions/row_getCanMultiSelect.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getCanMultiSelect -title: row_getCanMultiSelect ---- - -# Function: row\_getCanMultiSelect() - -```ts -function row_getCanMultiSelect(row): boolean; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:319](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L319) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/row_getCanPin.md b/docs/reference/functions/row_getCanPin.md deleted file mode 100644 index ca15bec473..0000000000 --- a/docs/reference/functions/row_getCanPin.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getCanPin -title: row_getCanPin ---- - -# Function: row\_getCanPin() - -```ts -function row_getCanPin(row): boolean; -``` - -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L119) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/row_getCanSelect.md b/docs/reference/functions/row_getCanSelect.md deleted file mode 100644 index 8abbd6f102..0000000000 --- a/docs/reference/functions/row_getCanSelect.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getCanSelect -title: row_getCanSelect ---- - -# Function: row\_getCanSelect() - -```ts -function row_getCanSelect(row): boolean; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:295](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L295) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/row_getCanSelectSubRows.md b/docs/reference/functions/row_getCanSelectSubRows.md deleted file mode 100644 index 723f0fb9b5..0000000000 --- a/docs/reference/functions/row_getCanSelectSubRows.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getCanSelectSubRows -title: row_getCanSelectSubRows ---- - -# Function: row\_getCanSelectSubRows() - -```ts -function row_getCanSelectSubRows(row): boolean; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:307](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L307) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/row_getCenterVisibleCells.md b/docs/reference/functions/row_getCenterVisibleCells.md deleted file mode 100644 index 1af5e97b28..0000000000 --- a/docs/reference/functions/row_getCenterVisibleCells.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getCenterVisibleCells -title: row_getCenterVisibleCells ---- - -# Function: row\_getCenterVisibleCells() - -```ts -function row_getCenterVisibleCells(row): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L118) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`any`[] diff --git a/docs/reference/functions/row_getGroupingValue.md b/docs/reference/functions/row_getGroupingValue.md deleted file mode 100644 index f665b1d53b..0000000000 --- a/docs/reference/functions/row_getGroupingValue.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -id: row_getGroupingValue -title: row_getGroupingValue ---- - -# Function: row\_getGroupingValue() - -```ts -function row_getGroupingValue(row, columnId): any; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:137](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L137) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row_Core`](../interfaces/Row_Core.md)\<`TFeatures`, `TData`\> & [`UnionToIntersection`](../type-aliases/UnionToIntersection.md)\< - \| `"columnFilteringFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnFiltering`](../interfaces/Row_ColumnFiltering.md)\<`TFeatures`, `TData`\> : `never` - \| `"columnGroupingFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnGrouping`](../interfaces/Row_ColumnGrouping.md) : `never` - \| `"columnPinningFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnPinning`](../interfaces/Row_ColumnPinning.md)\<`TFeatures`, `TData`\> : `never` - \| `"columnVisibilityFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnVisibility`](../interfaces/Row_ColumnVisibility.md)\<`TFeatures`, `TData`\> : `never` - \| `"rowExpandingFeature"` *extends* keyof `TFeatures` ? [`Row_RowExpanding`](../interfaces/Row_RowExpanding.md) : `never` - \| `"rowPinningFeature"` *extends* keyof `TFeatures` ? [`Row_RowPinning`](../interfaces/Row_RowPinning.md) : `never` - \| `"rowSelectionFeature"` *extends* keyof `TFeatures` ? [`Row_RowSelection`](../interfaces/Row_RowSelection.md) : `never`\> & [`UnionToIntersection`](../type-aliases/UnionToIntersection.md)\<\{ \[K in string \| number \| symbol\]: TFeatures\[K\] extends TableFeature\ ? "Row" extends keyof FeatureConstructorOptions ? FeatureConstructorOptions\[keyof FeatureConstructorOptions & "Row"\] : never : any \}\[keyof `TFeatures`\]\> & [`Row_Plugins`](../interfaces/Row_Plugins.md)\<`TFeatures`, `TData`\> & `Partial`\<[`Row_ColumnGrouping`](../interfaces/Row_ColumnGrouping.md)\> - -### columnId - -`string` - -## Returns - -`any` diff --git a/docs/reference/functions/row_getIsAllParentsExpanded.md b/docs/reference/functions/row_getIsAllParentsExpanded.md deleted file mode 100644 index d467263217..0000000000 --- a/docs/reference/functions/row_getIsAllParentsExpanded.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getIsAllParentsExpanded -title: row_getIsAllParentsExpanded ---- - -# Function: row\_getIsAllParentsExpanded() - -```ts -function row_getIsAllParentsExpanded(row): boolean; -``` - -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:182](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L182) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/row_getIsAllSubRowsSelected.md b/docs/reference/functions/row_getIsAllSubRowsSelected.md deleted file mode 100644 index cedddf3b13..0000000000 --- a/docs/reference/functions/row_getIsAllSubRowsSelected.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getIsAllSubRowsSelected -title: row_getIsAllSubRowsSelected ---- - -# Function: row\_getIsAllSubRowsSelected() - -```ts -function row_getIsAllSubRowsSelected(row): boolean; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:288](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L288) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/row_getIsExpanded.md b/docs/reference/functions/row_getIsExpanded.md deleted file mode 100644 index 7b2e324adb..0000000000 --- a/docs/reference/functions/row_getIsExpanded.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getIsExpanded -title: row_getIsExpanded ---- - -# Function: row\_getIsExpanded() - -```ts -function row_getIsExpanded(row): boolean; -``` - -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:160](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L160) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/row_getIsGrouped.md b/docs/reference/functions/row_getIsGrouped.md deleted file mode 100644 index b50ea63062..0000000000 --- a/docs/reference/functions/row_getIsGrouped.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -id: row_getIsGrouped -title: row_getIsGrouped ---- - -# Function: row\_getIsGrouped() - -```ts -function row_getIsGrouped(row): boolean; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L130) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row_Core`](../interfaces/Row_Core.md)\<`TFeatures`, `TData`\> & [`UnionToIntersection`](../type-aliases/UnionToIntersection.md)\< - \| `"columnFilteringFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnFiltering`](../interfaces/Row_ColumnFiltering.md)\<`TFeatures`, `TData`\> : `never` - \| `"columnGroupingFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnGrouping`](../interfaces/Row_ColumnGrouping.md) : `never` - \| `"columnPinningFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnPinning`](../interfaces/Row_ColumnPinning.md)\<`TFeatures`, `TData`\> : `never` - \| `"columnVisibilityFeature"` *extends* keyof `TFeatures` ? [`Row_ColumnVisibility`](../interfaces/Row_ColumnVisibility.md)\<`TFeatures`, `TData`\> : `never` - \| `"rowExpandingFeature"` *extends* keyof `TFeatures` ? [`Row_RowExpanding`](../interfaces/Row_RowExpanding.md) : `never` - \| `"rowPinningFeature"` *extends* keyof `TFeatures` ? [`Row_RowPinning`](../interfaces/Row_RowPinning.md) : `never` - \| `"rowSelectionFeature"` *extends* keyof `TFeatures` ? [`Row_RowSelection`](../interfaces/Row_RowSelection.md) : `never`\> & [`UnionToIntersection`](../type-aliases/UnionToIntersection.md)\<\{ \[K in string \| number \| symbol\]: TFeatures\[K\] extends TableFeature\ ? "Row" extends keyof FeatureConstructorOptions ? FeatureConstructorOptions\[keyof FeatureConstructorOptions & "Row"\] : never : any \}\[keyof `TFeatures`\]\> & [`Row_Plugins`](../interfaces/Row_Plugins.md)\<`TFeatures`, `TData`\> & `Partial`\<[`Row_ColumnGrouping`](../interfaces/Row_ColumnGrouping.md)\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/row_getIsPinned.md b/docs/reference/functions/row_getIsPinned.md deleted file mode 100644 index 808317d1d4..0000000000 --- a/docs/reference/functions/row_getIsPinned.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getIsPinned -title: row_getIsPinned ---- - -# Function: row\_getIsPinned() - -```ts -function row_getIsPinned(row): RowPinningPosition; -``` - -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L130) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowPinningPosition`](../type-aliases/RowPinningPosition.md) diff --git a/docs/reference/functions/row_getIsSelected.md b/docs/reference/functions/row_getIsSelected.md deleted file mode 100644 index 365338394a..0000000000 --- a/docs/reference/functions/row_getIsSelected.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getIsSelected -title: row_getIsSelected ---- - -# Function: row\_getIsSelected() - -```ts -function row_getIsSelected(row): boolean; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:274](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L274) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/row_getIsSomeSelected.md b/docs/reference/functions/row_getIsSomeSelected.md deleted file mode 100644 index 44be8b91b7..0000000000 --- a/docs/reference/functions/row_getIsSomeSelected.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getIsSomeSelected -title: row_getIsSomeSelected ---- - -# Function: row\_getIsSomeSelected() - -```ts -function row_getIsSomeSelected(row): 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) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/row_getLeafRows.md b/docs/reference/functions/row_getLeafRows.md deleted file mode 100644 index 3f80aefab9..0000000000 --- a/docs/reference/functions/row_getLeafRows.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getLeafRows -title: row_getLeafRows ---- - -# Function: row\_getLeafRows() - -```ts -function row_getLeafRows(row): Row[]; -``` - -Defined in: [core/rows/coreRowsFeature.utils.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L62) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/row_getLeftVisibleCells.md b/docs/reference/functions/row_getLeftVisibleCells.md deleted file mode 100644 index 30cc8f5d60..0000000000 --- a/docs/reference/functions/row_getLeftVisibleCells.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getLeftVisibleCells -title: row_getLeftVisibleCells ---- - -# Function: row\_getLeftVisibleCells() - -```ts -function row_getLeftVisibleCells(row): Cell[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:133](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L133) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/row_getParentRow.md b/docs/reference/functions/row_getParentRow.md deleted file mode 100644 index 1a864d7127..0000000000 --- a/docs/reference/functions/row_getParentRow.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getParentRow -title: row_getParentRow ---- - -# Function: row\_getParentRow() - -```ts -function row_getParentRow(row): Row | undefined; -``` - -Defined in: [core/rows/coreRowsFeature.utils.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L69) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> \| `undefined` diff --git a/docs/reference/functions/row_getParentRows.md b/docs/reference/functions/row_getParentRows.md deleted file mode 100644 index 04f0151e1d..0000000000 --- a/docs/reference/functions/row_getParentRows.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getParentRows -title: row_getParentRows ---- - -# Function: row\_getParentRows() - -```ts -function row_getParentRows(row): Row[]; -``` - -Defined in: [core/rows/coreRowsFeature.utils.ts:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L76) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/row_getPinnedIndex.md b/docs/reference/functions/row_getPinnedIndex.md deleted file mode 100644 index 8afb2f381f..0000000000 --- a/docs/reference/functions/row_getPinnedIndex.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getPinnedIndex -title: row_getPinnedIndex ---- - -# Function: row\_getPinnedIndex() - -```ts -function row_getPinnedIndex(row): number; -``` - -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:144](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L144) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`number` diff --git a/docs/reference/functions/row_getRightVisibleCells.md b/docs/reference/functions/row_getRightVisibleCells.md deleted file mode 100644 index 8e76ff1cd0..0000000000 --- a/docs/reference/functions/row_getRightVisibleCells.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: row_getRightVisibleCells -title: row_getRightVisibleCells ---- - -# Function: row\_getRightVisibleCells() - -```ts -function row_getRightVisibleCells(row): any; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:154](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L154) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`any` diff --git a/docs/reference/functions/row_getToggleExpandedHandler.md b/docs/reference/functions/row_getToggleExpandedHandler.md deleted file mode 100644 index 63f7a760e6..0000000000 --- a/docs/reference/functions/row_getToggleExpandedHandler.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -id: row_getToggleExpandedHandler -title: row_getToggleExpandedHandler ---- - -# Function: row\_getToggleExpandedHandler() - -```ts -function row_getToggleExpandedHandler(row): () => void; -``` - -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:197](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L197) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -```ts -(): void; -``` - -### Returns - -`void` diff --git a/docs/reference/functions/row_getToggleSelectedHandler.md b/docs/reference/functions/row_getToggleSelectedHandler.md deleted file mode 100644 index 40f35c4694..0000000000 --- a/docs/reference/functions/row_getToggleSelectedHandler.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -id: row_getToggleSelectedHandler -title: row_getToggleSelectedHandler ---- - -# Function: row\_getToggleSelectedHandler() - -```ts -function row_getToggleSelectedHandler(row): (e) => void; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:331](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L331) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -```ts -(e): void; -``` - -### Parameters - -#### e - -`unknown` - -### Returns - -`void` diff --git a/docs/reference/functions/row_getUniqueValues.md b/docs/reference/functions/row_getUniqueValues.md deleted file mode 100644 index 8a3798ef16..0000000000 --- a/docs/reference/functions/row_getUniqueValues.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: row_getUniqueValues -title: row_getUniqueValues ---- - -# Function: row\_getUniqueValues() - -```ts -function row_getUniqueValues(row, columnId): unknown; -``` - -Defined in: [core/rows/coreRowsFeature.utils.ts:28](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L28) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -### columnId - -`string` - -## Returns - -`unknown` diff --git a/docs/reference/functions/row_getValue.md b/docs/reference/functions/row_getValue.md deleted file mode 100644 index 8b0b76acfb..0000000000 --- a/docs/reference/functions/row_getValue.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: row_getValue -title: row_getValue ---- - -# Function: row\_getValue() - -```ts -function row_getValue(row, columnId): unknown; -``` - -Defined in: [core/rows/coreRowsFeature.utils.ts:9](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L9) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -### columnId - -`string` - -## Returns - -`unknown` diff --git a/docs/reference/functions/row_getVisibleCells.md b/docs/reference/functions/row_getVisibleCells.md deleted file mode 100644 index 8db6cd77b3..0000000000 --- a/docs/reference/functions/row_getVisibleCells.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -id: row_getVisibleCells -title: row_getVisibleCells ---- - -# Function: row\_getVisibleCells() - -```ts -function row_getVisibleCells( - left, - center, - right): Cell[]; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:79](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L79) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### left - -[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] - -### center - -[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] - -### right - -[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] - -## Returns - -[`Cell`](../type-aliases/Cell.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/row_pin.md b/docs/reference/functions/row_pin.md deleted file mode 100644 index 5b692e2b2c..0000000000 --- a/docs/reference/functions/row_pin.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -id: row_pin -title: row_pin ---- - -# Function: row\_pin() - -```ts -function row_pin( - row, - position, - includeLeafRows?, - includeParentRows?): void; -``` - -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:160](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L160) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -### position - -[`RowPinningPosition`](../type-aliases/RowPinningPosition.md) - -### includeLeafRows? - -`boolean` - -### includeParentRows? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/row_renderValue.md b/docs/reference/functions/row_renderValue.md deleted file mode 100644 index 7f81dcf762..0000000000 --- a/docs/reference/functions/row_renderValue.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: row_renderValue -title: row_renderValue ---- - -# Function: row\_renderValue() - -```ts -function row_renderValue(row, columnId): any; -``` - -Defined in: [core/rows/coreRowsFeature.utils.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L55) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -### columnId - -`string` - -## Returns - -`any` diff --git a/docs/reference/functions/row_toggleExpanded.md b/docs/reference/functions/row_toggleExpanded.md deleted file mode 100644 index 82e29ac378..0000000000 --- a/docs/reference/functions/row_toggleExpanded.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: row_toggleExpanded -title: row_toggleExpanded ---- - -# Function: row\_toggleExpanded() - -```ts -function row_toggleExpanded(row, expanded?): void; -``` - -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) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -### expanded? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/row_toggleSelected.md b/docs/reference/functions/row_toggleSelected.md deleted file mode 100644 index d812cae9a1..0000000000 --- a/docs/reference/functions/row_toggleSelected.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -id: row_toggleSelected -title: row_toggleSelected ---- - -# Function: row\_toggleSelected() - -```ts -function row_toggleSelected( - row, - value?, - opts?): void; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:241](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L241) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### row - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -### value? - -`boolean` - -### opts? - -#### selectChildren? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/selectRowsFn.md b/docs/reference/functions/selectRowsFn.md deleted file mode 100644 index 81c72ba780..0000000000 --- a/docs/reference/functions/selectRowsFn.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: selectRowsFn -title: selectRowsFn ---- - -# Function: selectRowsFn() - -```ts -function selectRowsFn(rowModel): RowModel; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:376](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L376) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### rowModel - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/shouldAutoRemoveFilter.md b/docs/reference/functions/shouldAutoRemoveFilter.md deleted file mode 100644 index 06d3fd1d4e..0000000000 --- a/docs/reference/functions/shouldAutoRemoveFilter.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -id: shouldAutoRemoveFilter -title: shouldAutoRemoveFilter ---- - -# Function: shouldAutoRemoveFilter() - -```ts -function shouldAutoRemoveFilter( - filterFn?, - value?, - column?): boolean; -``` - -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:194](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L194) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -### TValue - -`TValue` *extends* `unknown` = `unknown` - -## Parameters - -### filterFn? - -[`FilterFn`](../interfaces/FilterFn.md)\<`TFeatures`, `TData`\> - -### value? - -`any` - -### column? - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `TValue`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/tableMemo.md b/docs/reference/functions/tableMemo.md index c84ceb09a7..a1714cb062 100644 --- a/docs/reference/functions/tableMemo.md +++ b/docs/reference/functions/tableMemo.md @@ -9,7 +9,7 @@ title: tableMemo function tableMemo(__namedParameters): (depArgs?) => TResult; ``` -Defined in: [utils.ts:148](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L148) +Defined in: [utils.ts:143](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L143) ## Type Parameters diff --git a/docs/reference/functions/table_autoResetExpanded.md b/docs/reference/functions/table_autoResetExpanded.md deleted file mode 100644 index dd6be0c731..0000000000 --- a/docs/reference/functions/table_autoResetExpanded.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_autoResetExpanded -title: table_autoResetExpanded ---- - -# Function: table\_autoResetExpanded() - -```ts -function table_autoResetExpanded(table): void; -``` - -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L14) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_autoResetPageIndex.md b/docs/reference/functions/table_autoResetPageIndex.md deleted file mode 100644 index 2fe5a61126..0000000000 --- a/docs/reference/functions/table_autoResetPageIndex.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_autoResetPageIndex -title: table_autoResetPageIndex ---- - -# Function: table\_autoResetPageIndex() - -```ts -function table_autoResetPageIndex(table): void; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:17](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L17) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_firstPage.md b/docs/reference/functions/table_firstPage.md deleted file mode 100644 index c9c9edca1b..0000000000 --- a/docs/reference/functions/table_firstPage.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_firstPage -title: table_firstPage ---- - -# Function: table\_firstPage() - -```ts -function table_firstPage(table): void; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:172](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L172) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_getAllColumns.md b/docs/reference/functions/table_getAllColumns.md deleted file mode 100644 index 3262d7014e..0000000000 --- a/docs/reference/functions/table_getAllColumns.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getAllColumns -title: table_getAllColumns ---- - -# Function: table\_getAllColumns() - -```ts -function table_getAllColumns(table): Column[]; -``` - -Defined in: [core/columns/coreColumnsFeature.utils.ts:75](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L75) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getAllFlatColumns.md b/docs/reference/functions/table_getAllFlatColumns.md deleted file mode 100644 index 05f9b41efa..0000000000 --- a/docs/reference/functions/table_getAllFlatColumns.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getAllFlatColumns -title: table_getAllFlatColumns ---- - -# Function: table\_getAllFlatColumns() - -```ts -function table_getAllFlatColumns(table): Column[]; -``` - -Defined in: [core/columns/coreColumnsFeature.utils.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L106) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getAllFlatColumnsById.md b/docs/reference/functions/table_getAllFlatColumnsById.md deleted file mode 100644 index f8824493cc..0000000000 --- a/docs/reference/functions/table_getAllFlatColumnsById.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getAllFlatColumnsById -title: table_getAllFlatColumnsById ---- - -# Function: table\_getAllFlatColumnsById() - -```ts -function table_getAllFlatColumnsById(table): Record>; -``` - -Defined in: [core/columns/coreColumnsFeature.utils.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L115) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`Record`\<`string`, [`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>\> diff --git a/docs/reference/functions/table_getAllLeafColumns.md b/docs/reference/functions/table_getAllLeafColumns.md deleted file mode 100644 index 99da39c0b7..0000000000 --- a/docs/reference/functions/table_getAllLeafColumns.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getAllLeafColumns -title: table_getAllLeafColumns ---- - -# Function: table\_getAllLeafColumns() - -```ts -function table_getAllLeafColumns(table): Column[]; -``` - -Defined in: [core/columns/coreColumnsFeature.utils.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L130) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getBottomRows.md b/docs/reference/functions/table_getBottomRows.md deleted file mode 100644 index 7aa3adfd74..0000000000 --- a/docs/reference/functions/table_getBottomRows.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getBottomRows -title: table_getBottomRows ---- - -# Function: table\_getBottomRows() - -```ts -function table_getBottomRows(table): Row[]; -``` - -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:98](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L98) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getCanNextPage.md b/docs/reference/functions/table_getCanNextPage.md deleted file mode 100644 index c73e8f1e42..0000000000 --- a/docs/reference/functions/table_getCanNextPage.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getCanNextPage -title: table_getCanNextPage ---- - -# Function: table\_getCanNextPage() - -```ts -function table_getCanNextPage(table): boolean; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:137](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L137) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/table_getCanPreviousPage.md b/docs/reference/functions/table_getCanPreviousPage.md deleted file mode 100644 index e54fcb4a1c..0000000000 --- a/docs/reference/functions/table_getCanPreviousPage.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getCanPreviousPage -title: table_getCanPreviousPage ---- - -# Function: table\_getCanPreviousPage() - -```ts -function table_getCanPreviousPage(table): boolean; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:130](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L130) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/table_getCanSomeRowsExpand.md b/docs/reference/functions/table_getCanSomeRowsExpand.md deleted file mode 100644 index 490ba549a3..0000000000 --- a/docs/reference/functions/table_getCanSomeRowsExpand.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getCanSomeRowsExpand -title: table_getCanSomeRowsExpand ---- - -# Function: table\_getCanSomeRowsExpand() - -```ts -function table_getCanSomeRowsExpand(table): boolean; -``` - -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L55) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/table_getCenterFlatHeaders.md b/docs/reference/functions/table_getCenterFlatHeaders.md deleted file mode 100644 index ce24cd11a3..0000000000 --- a/docs/reference/functions/table_getCenterFlatHeaders.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getCenterFlatHeaders -title: table_getCenterFlatHeaders ---- - -# Function: table\_getCenterFlatHeaders() - -```ts -function table_getCenterFlatHeaders(table): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:347](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L347) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getCenterFooterGroups.md b/docs/reference/functions/table_getCenterFooterGroups.md deleted file mode 100644 index 9cc6033926..0000000000 --- a/docs/reference/functions/table_getCenterFooterGroups.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getCenterFooterGroups -title: table_getCenterFooterGroups ---- - -# Function: table\_getCenterFooterGroups() - -```ts -function table_getCenterFooterGroups(table): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:301](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L301) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getCenterHeaderGroups.md b/docs/reference/functions/table_getCenterHeaderGroups.md deleted file mode 100644 index 7f0deb46c2..0000000000 --- a/docs/reference/functions/table_getCenterHeaderGroups.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getCenterHeaderGroups -title: table_getCenterHeaderGroups ---- - -# Function: table\_getCenterHeaderGroups() - -```ts -function table_getCenterHeaderGroups(table): HeaderGroup[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:253](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L253) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getCenterLeafColumns.md b/docs/reference/functions/table_getCenterLeafColumns.md deleted file mode 100644 index 7e9fde45b1..0000000000 --- a/docs/reference/functions/table_getCenterLeafColumns.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getCenterLeafColumns -title: table_getCenterLeafColumns ---- - -# Function: table\_getCenterLeafColumns() - -```ts -function table_getCenterLeafColumns(table): Column[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:428](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L428) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getCenterLeafHeaders.md b/docs/reference/functions/table_getCenterLeafHeaders.md deleted file mode 100644 index 386bf7cc48..0000000000 --- a/docs/reference/functions/table_getCenterLeafHeaders.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getCenterLeafHeaders -title: table_getCenterLeafHeaders ---- - -# Function: table\_getCenterLeafHeaders() - -```ts -function table_getCenterLeafHeaders(table): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:387](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L387) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getCenterRows.md b/docs/reference/functions/table_getCenterRows.md deleted file mode 100644 index e45da10c5a..0000000000 --- a/docs/reference/functions/table_getCenterRows.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getCenterRows -title: table_getCenterRows ---- - -# Function: table\_getCenterRows() - -```ts -function table_getCenterRows(table): Row[]; -``` - -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L105) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getCenterTotalSize.md b/docs/reference/functions/table_getCenterTotalSize.md deleted file mode 100644 index 0c48b509cc..0000000000 --- a/docs/reference/functions/table_getCenterTotalSize.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getCenterTotalSize -title: table_getCenterTotalSize ---- - -# Function: table\_getCenterTotalSize() - -```ts -function table_getCenterTotalSize(table): any; -``` - -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:183](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L183) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any` diff --git a/docs/reference/functions/table_getCenterVisibleLeafColumns.md b/docs/reference/functions/table_getCenterVisibleLeafColumns.md deleted file mode 100644 index fdeeef1102..0000000000 --- a/docs/reference/functions/table_getCenterVisibleLeafColumns.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getCenterVisibleLeafColumns -title: table_getCenterVisibleLeafColumns ---- - -# Function: table\_getCenterVisibleLeafColumns() - -```ts -function table_getCenterVisibleLeafColumns(table): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:494](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L494) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getColumn.md b/docs/reference/functions/table_getColumn.md deleted file mode 100644 index 739efd2ccc..0000000000 --- a/docs/reference/functions/table_getColumn.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -id: table_getColumn -title: table_getColumn ---- - -# Function: table\_getColumn() - -```ts -function table_getColumn(table, columnId): - | Column - | undefined; -``` - -Defined in: [core/columns/coreColumnsFeature.utils.ts:146](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L146) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### columnId - -`string` - -## Returns - - \| [`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\> - \| `undefined` diff --git a/docs/reference/functions/table_getCoreRowModel.md b/docs/reference/functions/table_getCoreRowModel.md deleted file mode 100644 index 012c6b3ace..0000000000 --- a/docs/reference/functions/table_getCoreRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getCoreRowModel -title: table_getCoreRowModel ---- - -# Function: table\_getCoreRowModel() - -```ts -function table_getCoreRowModel(table): RowModel; -``` - -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L7) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getDefaultColumnDef.md b/docs/reference/functions/table_getDefaultColumnDef.md deleted file mode 100644 index 32760590af..0000000000 --- a/docs/reference/functions/table_getDefaultColumnDef.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getDefaultColumnDef -title: table_getDefaultColumnDef ---- - -# Function: table\_getDefaultColumnDef() - -```ts -function table_getDefaultColumnDef(table): Partial>; -``` - -Defined in: [core/columns/coreColumnsFeature.utils.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/columns/coreColumnsFeature.utils.ts#L46) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`Partial`\<[`ColumnDef`](../type-aliases/ColumnDef.md)\<`TFeatures`, `TData`, `unknown`\>\> diff --git a/docs/reference/functions/table_getExpandedDepth.md b/docs/reference/functions/table_getExpandedDepth.md deleted file mode 100644 index b91886b413..0000000000 --- a/docs/reference/functions/table_getExpandedDepth.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getExpandedDepth -title: table_getExpandedDepth ---- - -# Function: table\_getExpandedDepth() - -```ts -function table_getExpandedDepth(table): number; -``` - -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:106](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L106) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`number` diff --git a/docs/reference/functions/table_getExpandedRowModel.md b/docs/reference/functions/table_getExpandedRowModel.md deleted file mode 100644 index c6d0715b72..0000000000 --- a/docs/reference/functions/table_getExpandedRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getExpandedRowModel -title: table_getExpandedRowModel ---- - -# Function: table\_getExpandedRowModel() - -```ts -function table_getExpandedRowModel(table): RowModel; -``` - -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L96) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getFilteredRowModel.md b/docs/reference/functions/table_getFilteredRowModel.md deleted file mode 100644 index 82278c50a5..0000000000 --- a/docs/reference/functions/table_getFilteredRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getFilteredRowModel -title: table_getFilteredRowModel ---- - -# Function: table\_getFilteredRowModel() - -```ts -function table_getFilteredRowModel(table): RowModel; -``` - -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L27) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getFilteredSelectedRowModel.md b/docs/reference/functions/table_getFilteredSelectedRowModel.md deleted file mode 100644 index 0b3bf2522e..0000000000 --- a/docs/reference/functions/table_getFilteredSelectedRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getFilteredSelectedRowModel -title: table_getFilteredSelectedRowModel ---- - -# Function: table\_getFilteredSelectedRowModel() - -```ts -function table_getFilteredSelectedRowModel(table): RowModel; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:111](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L111) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getFlatHeaders.md b/docs/reference/functions/table_getFlatHeaders.md deleted file mode 100644 index 60cae4f60d..0000000000 --- a/docs/reference/functions/table_getFlatHeaders.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getFlatHeaders -title: table_getFlatHeaders ---- - -# Function: table\_getFlatHeaders() - -```ts -function table_getFlatHeaders(table): Header[]; -``` - -Defined in: [core/headers/coreHeadersFeature.utils.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L90) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Header`](../type-aliases/Header.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getFooterGroups.md b/docs/reference/functions/table_getFooterGroups.md deleted file mode 100644 index 092f380e5f..0000000000 --- a/docs/reference/functions/table_getFooterGroups.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getFooterGroups -title: table_getFooterGroups ---- - -# Function: table\_getFooterGroups() - -```ts -function table_getFooterGroups(table): HeaderGroup[]; -``` - -Defined in: [core/headers/coreHeadersFeature.utils.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L82) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getGlobalAutoFilterFn.md b/docs/reference/functions/table_getGlobalAutoFilterFn.md deleted file mode 100644 index 1cf7e7816e..0000000000 --- a/docs/reference/functions/table_getGlobalAutoFilterFn.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: table_getGlobalAutoFilterFn -title: table_getGlobalAutoFilterFn ---- - -# Function: table\_getGlobalAutoFilterFn() - -```ts -function table_getGlobalAutoFilterFn(): FilterFn; -``` - -Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:23](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L23) - -## Returns - -[`FilterFn`](../interfaces/FilterFn.md)\<`any`, `any`\> diff --git a/docs/reference/functions/table_getGlobalFacetedMinMaxValues.md b/docs/reference/functions/table_getGlobalFacetedMinMaxValues.md deleted file mode 100644 index 43b2434a92..0000000000 --- a/docs/reference/functions/table_getGlobalFacetedMinMaxValues.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getGlobalFacetedMinMaxValues -title: table_getGlobalFacetedMinMaxValues ---- - -# Function: table\_getGlobalFacetedMinMaxValues() - -```ts -function table_getGlobalFacetedMinMaxValues(table): [number, number] | undefined; -``` - -Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:49](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L49) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -\[`number`, `number`\] \| `undefined` diff --git a/docs/reference/functions/table_getGlobalFacetedRowModel.md b/docs/reference/functions/table_getGlobalFacetedRowModel.md deleted file mode 100644 index dbeaf848bf..0000000000 --- a/docs/reference/functions/table_getGlobalFacetedRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getGlobalFacetedRowModel -title: table_getGlobalFacetedRowModel ---- - -# Function: table\_getGlobalFacetedRowModel() - -```ts -function table_getGlobalFacetedRowModel(table): RowModel; -``` - -Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:59](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L59) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getGlobalFacetedUniqueValues.md b/docs/reference/functions/table_getGlobalFacetedUniqueValues.md deleted file mode 100644 index ae3dc890cf..0000000000 --- a/docs/reference/functions/table_getGlobalFacetedUniqueValues.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getGlobalFacetedUniqueValues -title: table_getGlobalFacetedUniqueValues ---- - -# Function: table\_getGlobalFacetedUniqueValues() - -```ts -function table_getGlobalFacetedUniqueValues(table): Map; -``` - -Defined in: [features/column-faceting/columnFacetingFeature.utils.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-faceting/columnFacetingFeature.utils.ts#L69) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`Map`\<`any`, `number`\> diff --git a/docs/reference/functions/table_getGlobalFilterFn.md b/docs/reference/functions/table_getGlobalFilterFn.md deleted file mode 100644 index 434caadec4..0000000000 --- a/docs/reference/functions/table_getGlobalFilterFn.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -id: table_getGlobalFilterFn -title: table_getGlobalFilterFn ---- - -# Function: table\_getGlobalFilterFn() - -```ts -function table_getGlobalFilterFn(table): - | FilterFn - | undefined; -``` - -Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L27) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - - \| [`FilterFn`](../interfaces/FilterFn.md)\<`TFeatures`, `TData`\> - \| `undefined` diff --git a/docs/reference/functions/table_getGroupedRowModel.md b/docs/reference/functions/table_getGroupedRowModel.md deleted file mode 100644 index d550ff834c..0000000000 --- a/docs/reference/functions/table_getGroupedRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getGroupedRowModel -title: table_getGroupedRowModel ---- - -# Function: table\_getGroupedRowModel() - -```ts -function table_getGroupedRowModel(table): RowModel; -``` - -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L50) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getGroupedSelectedRowModel.md b/docs/reference/functions/table_getGroupedSelectedRowModel.md deleted file mode 100644 index 742ce51198..0000000000 --- a/docs/reference/functions/table_getGroupedSelectedRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getGroupedSelectedRowModel -title: table_getGroupedSelectedRowModel ---- - -# Function: table\_getGroupedSelectedRowModel() - -```ts -function table_getGroupedSelectedRowModel(table): RowModel; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:128](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L128) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getHeaderGroups.md b/docs/reference/functions/table_getHeaderGroups.md deleted file mode 100644 index caa9b249bd..0000000000 --- a/docs/reference/functions/table_getHeaderGroups.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getHeaderGroups -title: table_getHeaderGroups ---- - -# Function: table\_getHeaderGroups() - -```ts -function table_getHeaderGroups(table): HeaderGroup[]; -``` - -Defined in: [core/headers/coreHeadersFeature.utils.ts:48](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L48) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getIsAllColumnsVisible.md b/docs/reference/functions/table_getIsAllColumnsVisible.md deleted file mode 100644 index b8ebb3acfa..0000000000 --- a/docs/reference/functions/table_getIsAllColumnsVisible.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getIsAllColumnsVisible -title: table_getIsAllColumnsVisible ---- - -# Function: table\_getIsAllColumnsVisible() - -```ts -function table_getIsAllColumnsVisible(table): boolean; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:150](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L150) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/table_getIsAllPageRowsSelected.md b/docs/reference/functions/table_getIsAllPageRowsSelected.md deleted file mode 100644 index 960f7cac98..0000000000 --- a/docs/reference/functions/table_getIsAllPageRowsSelected.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getIsAllPageRowsSelected -title: table_getIsAllPageRowsSelected ---- - -# Function: table\_getIsAllPageRowsSelected() - -```ts -function table_getIsAllPageRowsSelected(table): boolean; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:170](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L170) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/table_getIsAllRowsExpanded.md b/docs/reference/functions/table_getIsAllRowsExpanded.md deleted file mode 100644 index ffb10bf5ba..0000000000 --- a/docs/reference/functions/table_getIsAllRowsExpanded.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getIsAllRowsExpanded -title: table_getIsAllRowsExpanded ---- - -# Function: table\_getIsAllRowsExpanded() - -```ts -function table_getIsAllRowsExpanded(table): boolean; -``` - -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:82](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L82) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/table_getIsAllRowsSelected.md b/docs/reference/functions/table_getIsAllRowsSelected.md deleted file mode 100644 index 3b93de246f..0000000000 --- a/docs/reference/functions/table_getIsAllRowsSelected.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getIsAllRowsSelected -title: table_getIsAllRowsSelected ---- - -# Function: table\_getIsAllRowsSelected() - -```ts -function table_getIsAllRowsSelected(table): boolean; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:145](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L145) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/table_getIsSomeColumnsPinned.md b/docs/reference/functions/table_getIsSomeColumnsPinned.md deleted file mode 100644 index f7b1e38d84..0000000000 --- a/docs/reference/functions/table_getIsSomeColumnsPinned.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_getIsSomeColumnsPinned -title: table_getIsSomeColumnsPinned ---- - -# Function: table\_getIsSomeColumnsPinned() - -```ts -function table_getIsSomeColumnsPinned(table, position?): boolean; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:199](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L199) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### position? - -[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) - -## Returns - -`boolean` diff --git a/docs/reference/functions/table_getIsSomeColumnsVisible.md b/docs/reference/functions/table_getIsSomeColumnsVisible.md deleted file mode 100644 index 7214c5c9a0..0000000000 --- a/docs/reference/functions/table_getIsSomeColumnsVisible.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getIsSomeColumnsVisible -title: table_getIsSomeColumnsVisible ---- - -# Function: table\_getIsSomeColumnsVisible() - -```ts -function table_getIsSomeColumnsVisible(table): boolean; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:162](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L162) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/table_getIsSomePageRowsSelected.md b/docs/reference/functions/table_getIsSomePageRowsSelected.md deleted file mode 100644 index 90e749b9ee..0000000000 --- a/docs/reference/functions/table_getIsSomePageRowsSelected.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getIsSomePageRowsSelected -title: table_getIsSomePageRowsSelected ---- - -# Function: table\_getIsSomePageRowsSelected() - -```ts -function table_getIsSomePageRowsSelected(table): boolean; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:203](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L203) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/table_getIsSomeRowsExpanded.md b/docs/reference/functions/table_getIsSomeRowsExpanded.md deleted file mode 100644 index 362fbcfded..0000000000 --- a/docs/reference/functions/table_getIsSomeRowsExpanded.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getIsSomeRowsExpanded -title: table_getIsSomeRowsExpanded ---- - -# Function: table\_getIsSomeRowsExpanded() - -```ts -function table_getIsSomeRowsExpanded(table): boolean; -``` - -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:74](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L74) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/table_getIsSomeRowsPinned.md b/docs/reference/functions/table_getIsSomeRowsPinned.md deleted file mode 100644 index e5bc89d81f..0000000000 --- a/docs/reference/functions/table_getIsSomeRowsPinned.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_getIsSomeRowsPinned -title: table_getIsSomeRowsPinned ---- - -# Function: table\_getIsSomeRowsPinned() - -```ts -function table_getIsSomeRowsPinned(table, position?): boolean; -``` - -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L45) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### position? - -[`RowPinningPosition`](../type-aliases/RowPinningPosition.md) - -## Returns - -`boolean` diff --git a/docs/reference/functions/table_getIsSomeRowsSelected.md b/docs/reference/functions/table_getIsSomeRowsSelected.md deleted file mode 100644 index 46c1f5a1a3..0000000000 --- a/docs/reference/functions/table_getIsSomeRowsSelected.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getIsSomeRowsSelected -title: table_getIsSomeRowsSelected ---- - -# Function: table\_getIsSomeRowsSelected() - -```ts -function table_getIsSomeRowsSelected(table): boolean; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:192](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L192) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`boolean` diff --git a/docs/reference/functions/table_getLeafHeaders.md b/docs/reference/functions/table_getLeafHeaders.md deleted file mode 100644 index 55bd14e658..0000000000 --- a/docs/reference/functions/table_getLeafHeaders.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getLeafHeaders -title: table_getLeafHeaders ---- - -# Function: table\_getLeafHeaders() - -```ts -function table_getLeafHeaders(table): any[]; -``` - -Defined in: [core/headers/coreHeadersFeature.utils.ts:102](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts#L102) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getLeftFlatHeaders.md b/docs/reference/functions/table_getLeftFlatHeaders.md deleted file mode 100644 index f364e5cc0d..0000000000 --- a/docs/reference/functions/table_getLeftFlatHeaders.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getLeftFlatHeaders -title: table_getLeftFlatHeaders ---- - -# Function: table\_getLeftFlatHeaders() - -```ts -function table_getLeftFlatHeaders(table): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:315](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L315) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getLeftFooterGroups.md b/docs/reference/functions/table_getLeftFooterGroups.md deleted file mode 100644 index 109679e20e..0000000000 --- a/docs/reference/functions/table_getLeftFooterGroups.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getLeftFooterGroups -title: table_getLeftFooterGroups ---- - -# Function: table\_getLeftFooterGroups() - -```ts -function table_getLeftFooterGroups(table): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:277](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L277) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getLeftHeaderGroups.md b/docs/reference/functions/table_getLeftHeaderGroups.md deleted file mode 100644 index 38b0d67c6e..0000000000 --- a/docs/reference/functions/table_getLeftHeaderGroups.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getLeftHeaderGroups -title: table_getLeftHeaderGroups ---- - -# Function: table\_getLeftHeaderGroups() - -```ts -function table_getLeftHeaderGroups(table): HeaderGroup[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:213](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L213) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getLeftLeafColumns.md b/docs/reference/functions/table_getLeftLeafColumns.md deleted file mode 100644 index e1949f20a6..0000000000 --- a/docs/reference/functions/table_getLeftLeafColumns.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getLeftLeafColumns -title: table_getLeftLeafColumns ---- - -# Function: table\_getLeftLeafColumns() - -```ts -function table_getLeftLeafColumns(table): Column[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:400](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L400) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getLeftLeafHeaders.md b/docs/reference/functions/table_getLeftLeafHeaders.md deleted file mode 100644 index 6cfd443118..0000000000 --- a/docs/reference/functions/table_getLeftLeafHeaders.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getLeftLeafHeaders -title: table_getLeftLeafHeaders ---- - -# Function: table\_getLeftLeafHeaders() - -```ts -function table_getLeftLeafHeaders(table): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:365](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L365) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getLeftTotalSize.md b/docs/reference/functions/table_getLeftTotalSize.md deleted file mode 100644 index d103687b40..0000000000 --- a/docs/reference/functions/table_getLeftTotalSize.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getLeftTotalSize -title: table_getLeftTotalSize ---- - -# Function: table\_getLeftTotalSize() - -```ts -function table_getLeftTotalSize(table): any; -``` - -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:168](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L168) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any` diff --git a/docs/reference/functions/table_getLeftVisibleLeafColumns.md b/docs/reference/functions/table_getLeftVisibleLeafColumns.md deleted file mode 100644 index 53a01016eb..0000000000 --- a/docs/reference/functions/table_getLeftVisibleLeafColumns.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getLeftVisibleLeafColumns -title: table_getLeftVisibleLeafColumns ---- - -# Function: table\_getLeftVisibleLeafColumns() - -```ts -function table_getLeftVisibleLeafColumns(table): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:468](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L468) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getOrderColumnsFn.md b/docs/reference/functions/table_getOrderColumnsFn.md deleted file mode 100644 index df1d229957..0000000000 --- a/docs/reference/functions/table_getOrderColumnsFn.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -id: table_getOrderColumnsFn -title: table_getOrderColumnsFn ---- - -# Function: table\_getOrderColumnsFn() - -```ts -function table_getOrderColumnsFn(table): (columns) => Column_Internal[]; -``` - -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L67) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -```ts -(columns): Column_Internal[]; -``` - -### Parameters - -#### columns - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `unknown`\>[] - -### Returns - -[`Column_Internal`](../type-aliases/Column_Internal.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getPageCount.md b/docs/reference/functions/table_getPageCount.md deleted file mode 100644 index 3f22dbfe6f..0000000000 --- a/docs/reference/functions/table_getPageCount.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getPageCount -title: table_getPageCount ---- - -# Function: table\_getPageCount() - -```ts -function table_getPageCount(table): number; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:186](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L186) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`number` diff --git a/docs/reference/functions/table_getPageOptions.md b/docs/reference/functions/table_getPageOptions.md deleted file mode 100644 index c80263f424..0000000000 --- a/docs/reference/functions/table_getPageOptions.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getPageOptions -title: table_getPageOptions ---- - -# Function: table\_getPageOptions() - -```ts -function table_getPageOptions(table): number[]; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:118](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L118) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`number`[] diff --git a/docs/reference/functions/table_getPaginatedRowModel.md b/docs/reference/functions/table_getPaginatedRowModel.md deleted file mode 100644 index 6996562149..0000000000 --- a/docs/reference/functions/table_getPaginatedRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getPaginatedRowModel -title: table_getPaginatedRowModel ---- - -# Function: table\_getPaginatedRowModel() - -```ts -function table_getPaginatedRowModel(table): RowModel; -``` - -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L119) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getPinnedLeafColumns.md b/docs/reference/functions/table_getPinnedLeafColumns.md deleted file mode 100644 index f9b6329fc5..0000000000 --- a/docs/reference/functions/table_getPinnedLeafColumns.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_getPinnedLeafColumns -title: table_getPinnedLeafColumns ---- - -# Function: table\_getPinnedLeafColumns() - -```ts -function table_getPinnedLeafColumns(table, position): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:438](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L438) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### position - -[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getPinnedVisibleLeafColumns.md b/docs/reference/functions/table_getPinnedVisibleLeafColumns.md deleted file mode 100644 index 03fd18975d..0000000000 --- a/docs/reference/functions/table_getPinnedVisibleLeafColumns.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_getPinnedVisibleLeafColumns -title: table_getPinnedVisibleLeafColumns ---- - -# Function: table\_getPinnedVisibleLeafColumns() - -```ts -function table_getPinnedVisibleLeafColumns(table, position?): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:507](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L507) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### position? - -[`ColumnPinningPosition`](../type-aliases/ColumnPinningPosition.md) | `"center"` - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getPreExpandedRowModel.md b/docs/reference/functions/table_getPreExpandedRowModel.md deleted file mode 100644 index 5cb7eddb47..0000000000 --- a/docs/reference/functions/table_getPreExpandedRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getPreExpandedRowModel -title: table_getPreExpandedRowModel ---- - -# Function: table\_getPreExpandedRowModel() - -```ts -function table_getPreExpandedRowModel(table): RowModel; -``` - -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L89) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getPreFilteredRowModel.md b/docs/reference/functions/table_getPreFilteredRowModel.md deleted file mode 100644 index 603795219d..0000000000 --- a/docs/reference/functions/table_getPreFilteredRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getPreFilteredRowModel -title: table_getPreFilteredRowModel ---- - -# Function: table\_getPreFilteredRowModel() - -```ts -function table_getPreFilteredRowModel(table): RowModel; -``` - -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:20](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L20) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getPreGroupedRowModel.md b/docs/reference/functions/table_getPreGroupedRowModel.md deleted file mode 100644 index 3c2f92571c..0000000000 --- a/docs/reference/functions/table_getPreGroupedRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getPreGroupedRowModel -title: table_getPreGroupedRowModel ---- - -# Function: table\_getPreGroupedRowModel() - -```ts -function table_getPreGroupedRowModel(table): RowModel; -``` - -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L43) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getPrePaginatedRowModel.md b/docs/reference/functions/table_getPrePaginatedRowModel.md deleted file mode 100644 index 33b8000ea1..0000000000 --- a/docs/reference/functions/table_getPrePaginatedRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getPrePaginatedRowModel -title: table_getPrePaginatedRowModel ---- - -# Function: table\_getPrePaginatedRowModel() - -```ts -function table_getPrePaginatedRowModel(table): RowModel; -``` - -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L112) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getPreSelectedRowModel.md b/docs/reference/functions/table_getPreSelectedRowModel.md deleted file mode 100644 index c165218481..0000000000 --- a/docs/reference/functions/table_getPreSelectedRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getPreSelectedRowModel -title: table_getPreSelectedRowModel ---- - -# Function: table\_getPreSelectedRowModel() - -```ts -function table_getPreSelectedRowModel(table): RowModel; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:87](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L87) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getPreSortedRowModel.md b/docs/reference/functions/table_getPreSortedRowModel.md deleted file mode 100644 index d0a12c85de..0000000000 --- a/docs/reference/functions/table_getPreSortedRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getPreSortedRowModel -title: table_getPreSortedRowModel ---- - -# Function: table\_getPreSortedRowModel() - -```ts -function table_getPreSortedRowModel(table): RowModel; -``` - -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:66](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L66) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getRightFlatHeaders.md b/docs/reference/functions/table_getRightFlatHeaders.md deleted file mode 100644 index 4aace1cb48..0000000000 --- a/docs/reference/functions/table_getRightFlatHeaders.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getRightFlatHeaders -title: table_getRightFlatHeaders ---- - -# Function: table\_getRightFlatHeaders() - -```ts -function table_getRightFlatHeaders(table): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:331](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L331) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getRightFooterGroups.md b/docs/reference/functions/table_getRightFooterGroups.md deleted file mode 100644 index d783e28b41..0000000000 --- a/docs/reference/functions/table_getRightFooterGroups.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getRightFooterGroups -title: table_getRightFooterGroups ---- - -# Function: table\_getRightFooterGroups() - -```ts -function table_getRightFooterGroups(table): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:289](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L289) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getRightHeaderGroups.md b/docs/reference/functions/table_getRightHeaderGroups.md deleted file mode 100644 index 84bb873bcf..0000000000 --- a/docs/reference/functions/table_getRightHeaderGroups.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getRightHeaderGroups -title: table_getRightHeaderGroups ---- - -# Function: table\_getRightHeaderGroups() - -```ts -function table_getRightHeaderGroups(table): HeaderGroup[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:233](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L233) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`HeaderGroup`](../type-aliases/HeaderGroup.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getRightLeafColumns.md b/docs/reference/functions/table_getRightLeafColumns.md deleted file mode 100644 index 349a11ad53..0000000000 --- a/docs/reference/functions/table_getRightLeafColumns.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getRightLeafColumns -title: table_getRightLeafColumns ---- - -# Function: table\_getRightLeafColumns() - -```ts -function table_getRightLeafColumns(table): Column[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:414](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L414) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getRightLeafHeaders.md b/docs/reference/functions/table_getRightLeafHeaders.md deleted file mode 100644 index b5954174a6..0000000000 --- a/docs/reference/functions/table_getRightLeafHeaders.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getRightLeafHeaders -title: table_getRightLeafHeaders ---- - -# Function: table\_getRightLeafHeaders() - -```ts -function table_getRightLeafHeaders(table): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:376](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L376) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getRightTotalSize.md b/docs/reference/functions/table_getRightTotalSize.md deleted file mode 100644 index e212ade5cd..0000000000 --- a/docs/reference/functions/table_getRightTotalSize.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getRightTotalSize -title: table_getRightTotalSize ---- - -# Function: table\_getRightTotalSize() - -```ts -function table_getRightTotalSize(table): any; -``` - -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:198](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L198) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any` diff --git a/docs/reference/functions/table_getRightVisibleLeafColumns.md b/docs/reference/functions/table_getRightVisibleLeafColumns.md deleted file mode 100644 index 7db070ec85..0000000000 --- a/docs/reference/functions/table_getRightVisibleLeafColumns.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getRightVisibleLeafColumns -title: table_getRightVisibleLeafColumns ---- - -# Function: table\_getRightVisibleLeafColumns() - -```ts -function table_getRightVisibleLeafColumns(table): any[]; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:481](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L481) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`any`[] diff --git a/docs/reference/functions/table_getRow.md b/docs/reference/functions/table_getRow.md deleted file mode 100644 index 6c25537082..0000000000 --- a/docs/reference/functions/table_getRow.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -id: table_getRow -title: table_getRow ---- - -# Function: table\_getRow() - -```ts -function table_getRow( - table, - rowId, -searchAll?): Row; -``` - -Defined in: [core/rows/coreRowsFeature.utils.ts:129](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L129) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### rowId - -`string` - -### searchAll? - -`boolean` - -## Returns - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getRowCount.md b/docs/reference/functions/table_getRowCount.md deleted file mode 100644 index 7ab73f67ef..0000000000 --- a/docs/reference/functions/table_getRowCount.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getRowCount -title: table_getRowCount ---- - -# Function: table\_getRowCount() - -```ts -function table_getRowCount(table): number; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:199](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L199) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`number` diff --git a/docs/reference/functions/table_getRowId.md b/docs/reference/functions/table_getRowId.md deleted file mode 100644 index 9b1fa0c820..0000000000 --- a/docs/reference/functions/table_getRowId.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -id: table_getRowId -title: table_getRowId ---- - -# Function: table\_getRowId() - -```ts -function table_getRowId( - originalRow, - table, - index, - parent?): string; -``` - -Defined in: [core/rows/coreRowsFeature.utils.ts:114](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/rows/coreRowsFeature.utils.ts#L114) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### originalRow - -`TData` - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### index - -`number` - -### parent? - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\> - -## Returns - -`string` diff --git a/docs/reference/functions/table_getRowModel.md b/docs/reference/functions/table_getRowModel.md deleted file mode 100644 index 303f6fabb2..0000000000 --- a/docs/reference/functions/table_getRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getRowModel -title: table_getRowModel ---- - -# Function: table\_getRowModel() - -```ts -function table_getRowModel(table): RowModel; -``` - -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:135](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L135) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getSelectedRowModel.md b/docs/reference/functions/table_getSelectedRowModel.md deleted file mode 100644 index 7172e0dbb0..0000000000 --- a/docs/reference/functions/table_getSelectedRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getSelectedRowModel -title: table_getSelectedRowModel ---- - -# Function: table\_getSelectedRowModel() - -```ts -function table_getSelectedRowModel(table): RowModel; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L94) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getSortedRowModel.md b/docs/reference/functions/table_getSortedRowModel.md deleted file mode 100644 index d602828f2c..0000000000 --- a/docs/reference/functions/table_getSortedRowModel.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getSortedRowModel -title: table_getSortedRowModel ---- - -# Function: table\_getSortedRowModel() - -```ts -function table_getSortedRowModel(table): RowModel; -``` - -Defined in: [core/row-models/coreRowModelsFeature.utils.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/row-models/coreRowModelsFeature.utils.ts#L73) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`RowModel`](../interfaces/RowModel.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_getToggleAllColumnsVisibilityHandler.md b/docs/reference/functions/table_getToggleAllColumnsVisibilityHandler.md deleted file mode 100644 index 704eff3bb0..0000000000 --- a/docs/reference/functions/table_getToggleAllColumnsVisibilityHandler.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -id: table_getToggleAllColumnsVisibilityHandler -title: table_getToggleAllColumnsVisibilityHandler ---- - -# Function: table\_getToggleAllColumnsVisibilityHandler() - -```ts -function table_getToggleAllColumnsVisibilityHandler(table): (e) => void; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:173](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L173) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -```ts -(e): void; -``` - -### Parameters - -#### e - -`unknown` - -### Returns - -`void` diff --git a/docs/reference/functions/table_getToggleAllPageRowsSelectedHandler.md b/docs/reference/functions/table_getToggleAllPageRowsSelectedHandler.md deleted file mode 100644 index 799f1a1c61..0000000000 --- a/docs/reference/functions/table_getToggleAllPageRowsSelectedHandler.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -id: table_getToggleAllPageRowsSelectedHandler -title: table_getToggleAllPageRowsSelectedHandler ---- - -# Function: table\_getToggleAllPageRowsSelectedHandler() - -```ts -function table_getToggleAllPageRowsSelectedHandler(table): (e) => void; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:227](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L227) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -```ts -(e): void; -``` - -### Parameters - -#### e - -`unknown` - -### Returns - -`void` diff --git a/docs/reference/functions/table_getToggleAllRowsExpandedHandler.md b/docs/reference/functions/table_getToggleAllRowsExpandedHandler.md deleted file mode 100644 index e66d3171e0..0000000000 --- a/docs/reference/functions/table_getToggleAllRowsExpandedHandler.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -id: table_getToggleAllRowsExpandedHandler -title: table_getToggleAllRowsExpandedHandler ---- - -# Function: table\_getToggleAllRowsExpandedHandler() - -```ts -function table_getToggleAllRowsExpandedHandler(table): (e) => void; -``` - -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:64](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L64) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -```ts -(e): void; -``` - -### Parameters - -#### e - -`unknown` - -### Returns - -`void` diff --git a/docs/reference/functions/table_getToggleAllRowsSelectedHandler.md b/docs/reference/functions/table_getToggleAllRowsSelectedHandler.md deleted file mode 100644 index 6212b6a5f3..0000000000 --- a/docs/reference/functions/table_getToggleAllRowsSelectedHandler.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -id: table_getToggleAllRowsSelectedHandler -title: table_getToggleAllRowsSelectedHandler ---- - -# Function: table\_getToggleAllRowsSelectedHandler() - -```ts -function table_getToggleAllRowsSelectedHandler(table): (e) => void; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:215](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L215) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -```ts -(e): void; -``` - -### Parameters - -#### e - -`unknown` - -### Returns - -`void` diff --git a/docs/reference/functions/table_getTopRows.md b/docs/reference/functions/table_getTopRows.md deleted file mode 100644 index b5230c2d34..0000000000 --- a/docs/reference/functions/table_getTopRows.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getTopRows -title: table_getTopRows ---- - -# Function: table\_getTopRows() - -```ts -function table_getTopRows(table): Row[]; -``` - -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:91](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L91) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Row`](../type-aliases/Row.md)\<`TFeatures`, `TData`\>[] diff --git a/docs/reference/functions/table_getTotalSize.md b/docs/reference/functions/table_getTotalSize.md deleted file mode 100644 index 007b1e3928..0000000000 --- a/docs/reference/functions/table_getTotalSize.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getTotalSize -title: table_getTotalSize ---- - -# Function: table\_getTotalSize() - -```ts -function table_getTotalSize(table): number; -``` - -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:157](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L157) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`number` diff --git a/docs/reference/functions/table_getVisibleFlatColumns.md b/docs/reference/functions/table_getVisibleFlatColumns.md deleted file mode 100644 index 91af3fecd7..0000000000 --- a/docs/reference/functions/table_getVisibleFlatColumns.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getVisibleFlatColumns -title: table_getVisibleFlatColumns ---- - -# Function: table\_getVisibleFlatColumns() - -```ts -function table_getVisibleFlatColumns(table): Column[]; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:90](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L90) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_getVisibleLeafColumns.md b/docs/reference/functions/table_getVisibleLeafColumns.md deleted file mode 100644 index 27e489fcdf..0000000000 --- a/docs/reference/functions/table_getVisibleLeafColumns.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_getVisibleLeafColumns -title: table_getVisibleLeafColumns ---- - -# Function: table\_getVisibleLeafColumns() - -```ts -function table_getVisibleLeafColumns(table): Column[]; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L101) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -[`Column`](../type-aliases/Column.md)\<`TFeatures`, `TData`, `unknown`\>[] diff --git a/docs/reference/functions/table_lastPage.md b/docs/reference/functions/table_lastPage.md deleted file mode 100644 index abf04de99a..0000000000 --- a/docs/reference/functions/table_lastPage.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_lastPage -title: table_lastPage ---- - -# Function: table\_lastPage() - -```ts -function table_lastPage(table): void; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:179](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L179) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_mergeOptions.md b/docs/reference/functions/table_mergeOptions.md deleted file mode 100644 index 4291d7c53c..0000000000 --- a/docs/reference/functions/table_mergeOptions.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_mergeOptions -title: table_mergeOptions ---- - -# Function: table\_mergeOptions() - -```ts -function table_mergeOptions(table, newOptions): TableOptions; -``` - -Defined in: [core/table/coreTablesFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.utils.ts#L14) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### newOptions - -[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\> - -## Returns - -[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\> diff --git a/docs/reference/functions/table_nextPage.md b/docs/reference/functions/table_nextPage.md deleted file mode 100644 index 23e6fd966d..0000000000 --- a/docs/reference/functions/table_nextPage.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_nextPage -title: table_nextPage ---- - -# Function: table\_nextPage() - -```ts -function table_nextPage(table): void; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:163](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L163) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_previousPage.md b/docs/reference/functions/table_previousPage.md deleted file mode 100644 index d62365d50a..0000000000 --- a/docs/reference/functions/table_previousPage.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_previousPage -title: table_previousPage ---- - -# Function: table\_previousPage() - -```ts -function table_previousPage(table): void; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L156) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_reset.md b/docs/reference/functions/table_reset.md deleted file mode 100644 index 268cd94307..0000000000 --- a/docs/reference/functions/table_reset.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: table_reset -title: table_reset ---- - -# Function: table\_reset() - -```ts -function table_reset(table): void; -``` - -Defined in: [core/table/coreTablesFeature.utils.ts:7](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.utils.ts#L7) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetColumnFilters.md b/docs/reference/functions/table_resetColumnFilters.md deleted file mode 100644 index f788d879eb..0000000000 --- a/docs/reference/functions/table_resetColumnFilters.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetColumnFilters -title: table_resetColumnFilters ---- - -# Function: table\_resetColumnFilters() - -```ts -function table_resetColumnFilters(table, defaultState?): void; -``` - -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:184](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L184) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetColumnOrder.md b/docs/reference/functions/table_resetColumnOrder.md deleted file mode 100644 index 0873757721..0000000000 --- a/docs/reference/functions/table_resetColumnOrder.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetColumnOrder -title: table_resetColumnOrder ---- - -# Function: table\_resetColumnOrder() - -```ts -function table_resetColumnOrder(table, defaultState?): void; -``` - -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L57) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetColumnPinning.md b/docs/reference/functions/table_resetColumnPinning.md deleted file mode 100644 index fbfbaffe0a..0000000000 --- a/docs/reference/functions/table_resetColumnPinning.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetColumnPinning -title: table_resetColumnPinning ---- - -# Function: table\_resetColumnPinning() - -```ts -function table_resetColumnPinning(table, defaultState?): void; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:187](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L187) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetColumnSizing.md b/docs/reference/functions/table_resetColumnSizing.md deleted file mode 100644 index 26b017da2c..0000000000 --- a/docs/reference/functions/table_resetColumnSizing.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetColumnSizing -title: table_resetColumnSizing ---- - -# Function: table\_resetColumnSizing() - -```ts -function table_resetColumnSizing(table, defaultState?): void; -``` - -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:147](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L147) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetColumnVisibility.md b/docs/reference/functions/table_resetColumnVisibility.md deleted file mode 100644 index f0f3ec5741..0000000000 --- a/docs/reference/functions/table_resetColumnVisibility.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetColumnVisibility -title: table_resetColumnVisibility ---- - -# Function: table\_resetColumnVisibility() - -```ts -function table_resetColumnVisibility(table, defaultState?): void; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L122) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetExpanded.md b/docs/reference/functions/table_resetExpanded.md deleted file mode 100644 index a164e7b853..0000000000 --- a/docs/reference/functions/table_resetExpanded.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetExpanded -title: table_resetExpanded ---- - -# Function: table\_resetExpanded() - -```ts -function table_resetExpanded(table, defaultState?): void; -``` - -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L45) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetGlobalFilter.md b/docs/reference/functions/table_resetGlobalFilter.md deleted file mode 100644 index e79e2fa396..0000000000 --- a/docs/reference/functions/table_resetGlobalFilter.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetGlobalFilter -title: table_resetGlobalFilter ---- - -# Function: table\_resetGlobalFilter() - -```ts -function table_resetGlobalFilter(table, defaultState?): void; -``` - -Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L52) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetGrouping.md b/docs/reference/functions/table_resetGrouping.md deleted file mode 100644 index 958d286225..0000000000 --- a/docs/reference/functions/table_resetGrouping.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetGrouping -title: table_resetGrouping ---- - -# Function: table\_resetGrouping() - -```ts -function table_resetGrouping(table, defaultState?): void; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:120](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L120) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetHeaderSizeInfo.md b/docs/reference/functions/table_resetHeaderSizeInfo.md deleted file mode 100644 index 74d8a31964..0000000000 --- a/docs/reference/functions/table_resetHeaderSizeInfo.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetHeaderSizeInfo -title: table_resetHeaderSizeInfo ---- - -# Function: table\_resetHeaderSizeInfo() - -```ts -function table_resetHeaderSizeInfo(table, defaultState?): void; -``` - -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:232](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L232) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetPageIndex.md b/docs/reference/functions/table_resetPageIndex.md deleted file mode 100644 index affab42ebb..0000000000 --- a/docs/reference/functions/table_resetPageIndex.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetPageIndex -title: table_resetPageIndex ---- - -# Function: table\_resetPageIndex() - -```ts -function table_resetPageIndex(table, defaultState?): void; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:77](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L77) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetPageSize.md b/docs/reference/functions/table_resetPageSize.md deleted file mode 100644 index 38fbe43662..0000000000 --- a/docs/reference/functions/table_resetPageSize.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetPageSize -title: table_resetPageSize ---- - -# Function: table\_resetPageSize() - -```ts -function table_resetPageSize(table, defaultState?): void; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L89) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetPagination.md b/docs/reference/functions/table_resetPagination.md deleted file mode 100644 index 498e798574..0000000000 --- a/docs/reference/functions/table_resetPagination.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetPagination -title: table_resetPagination ---- - -# Function: table\_resetPagination() - -```ts -function table_resetPagination(table, defaultState?): void; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L43) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetRowPinning.md b/docs/reference/functions/table_resetRowPinning.md deleted file mode 100644 index 5a3fec2b65..0000000000 --- a/docs/reference/functions/table_resetRowPinning.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetRowPinning -title: table_resetRowPinning ---- - -# Function: table\_resetRowPinning() - -```ts -function table_resetRowPinning(table, defaultState?): void; -``` - -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L31) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetRowSelection.md b/docs/reference/functions/table_resetRowSelection.md deleted file mode 100644 index 3b26e10215..0000000000 --- a/docs/reference/functions/table_resetRowSelection.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetRowSelection -title: table_resetRowSelection ---- - -# Function: table\_resetRowSelection() - -```ts -function table_resetRowSelection(table, defaultState?): void; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:24](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L24) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_resetSorting.md b/docs/reference/functions/table_resetSorting.md deleted file mode 100644 index 430ee9571e..0000000000 --- a/docs/reference/functions/table_resetSorting.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_resetSorting -title: table_resetSorting ---- - -# Function: table\_resetSorting() - -```ts -function table_resetSorting(table, defaultState?): void; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L26) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### defaultState? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_setColumnFilters.md b/docs/reference/functions/table_setColumnFilters.md deleted file mode 100644 index 7f99000024..0000000000 --- a/docs/reference/functions/table_setColumnFilters.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setColumnFilters -title: table_setColumnFilters ---- - -# Function: table\_setColumnFilters() - -```ts -function table_setColumnFilters(table, updater): void; -``` - -Defined in: [features/column-filtering/columnFilteringFeature.utils.ts:156](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts#L156) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<[`ColumnFiltersState`](../type-aliases/ColumnFiltersState.md)\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_setColumnOrder.md b/docs/reference/functions/table_setColumnOrder.md deleted file mode 100644 index ef3b2542cd..0000000000 --- a/docs/reference/functions/table_setColumnOrder.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setColumnOrder -title: table_setColumnOrder ---- - -# Function: table\_setColumnOrder() - -```ts -function table_setColumnOrder(table, updater): void; -``` - -Defined in: [features/column-ordering/columnOrderingFeature.utils.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts#L50) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<[`ColumnOrderState`](../type-aliases/ColumnOrderState.md)\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_setColumnPinning.md b/docs/reference/functions/table_setColumnPinning.md deleted file mode 100644 index 6f139e9347..0000000000 --- a/docs/reference/functions/table_setColumnPinning.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setColumnPinning -title: table_setColumnPinning ---- - -# Function: table\_setColumnPinning() - -```ts -function table_setColumnPinning(table, updater): void; -``` - -Defined in: [features/column-pinning/columnPinningFeature.utils.ts:177](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts#L177) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<[`ColumnPinningState`](../interfaces/ColumnPinningState.md)\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_setColumnResizing.md b/docs/reference/functions/table_setColumnResizing.md deleted file mode 100644 index 29d0442a13..0000000000 --- a/docs/reference/functions/table_setColumnResizing.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setColumnResizing -title: table_setColumnResizing ---- - -# Function: table\_setColumnResizing() - -```ts -function table_setColumnResizing(table, updater): void; -``` - -Defined in: [features/column-resizing/columnResizingFeature.utils.ts:222](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts#L222) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<[`columnResizingState`](../interfaces/columnResizingState.md)\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_setColumnSizing.md b/docs/reference/functions/table_setColumnSizing.md deleted file mode 100644 index 40553648e4..0000000000 --- a/docs/reference/functions/table_setColumnSizing.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setColumnSizing -title: table_setColumnSizing ---- - -# Function: table\_setColumnSizing() - -```ts -function table_setColumnSizing(table, updater): void; -``` - -Defined in: [features/column-sizing/columnSizingFeature.utils.ts:137](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts#L137) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<[`ColumnSizingState`](../type-aliases/ColumnSizingState.md)\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_setColumnVisibility.md b/docs/reference/functions/table_setColumnVisibility.md deleted file mode 100644 index d3fdb3b74a..0000000000 --- a/docs/reference/functions/table_setColumnVisibility.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setColumnVisibility -title: table_setColumnVisibility ---- - -# Function: table\_setColumnVisibility() - -```ts -function table_setColumnVisibility(table, updater): void; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L112) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<[`ColumnVisibilityState`](../type-aliases/ColumnVisibilityState.md)\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_setExpanded.md b/docs/reference/functions/table_setExpanded.md deleted file mode 100644 index dab47fb281..0000000000 --- a/docs/reference/functions/table_setExpanded.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setExpanded -title: table_setExpanded ---- - -# Function: table\_setExpanded() - -```ts -function table_setExpanded(table, updater): void; -``` - -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:27](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L27) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<[`ExpandedState`](../type-aliases/ExpandedState.md)\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_setGlobalFilter.md b/docs/reference/functions/table_setGlobalFilter.md deleted file mode 100644 index 4405ffe0ce..0000000000 --- a/docs/reference/functions/table_setGlobalFilter.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setGlobalFilter -title: table_setGlobalFilter ---- - -# Function: table\_setGlobalFilter() - -```ts -function table_setGlobalFilter(table, updater): void; -``` - -Defined in: [features/global-filtering/globalFilteringFeature.utils.ts:45](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/global-filtering/globalFilteringFeature.utils.ts#L45) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -`any` - -## Returns - -`void` diff --git a/docs/reference/functions/table_setGrouping.md b/docs/reference/functions/table_setGrouping.md deleted file mode 100644 index 2f830a010c..0000000000 --- a/docs/reference/functions/table_setGrouping.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setGrouping -title: table_setGrouping ---- - -# Function: table\_setGrouping() - -```ts -function table_setGrouping(table, updater): void; -``` - -Defined in: [features/column-grouping/columnGroupingFeature.utils.ts:113](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts#L113) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<[`GroupingState`](../type-aliases/GroupingState.md)\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_setOptions.md b/docs/reference/functions/table_setOptions.md deleted file mode 100644 index fb947a6249..0000000000 --- a/docs/reference/functions/table_setOptions.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setOptions -title: table_setOptions ---- - -# Function: table\_setOptions() - -```ts -function table_setOptions(table, updater): void; -``` - -Defined in: [core/table/coreTablesFeature.utils.ts:31](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.utils.ts#L31) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<[`TableOptions`](../type-aliases/TableOptions.md)\<`TFeatures`, `TData`\>\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_setPageIndex.md b/docs/reference/functions/table_setPageIndex.md deleted file mode 100644 index 1b8ccdec18..0000000000 --- a/docs/reference/functions/table_setPageIndex.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setPageIndex -title: table_setPageIndex ---- - -# Function: table\_setPageIndex() - -```ts -function table_setPageIndex(table, updater): void; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L55) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<`number`\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_setPageSize.md b/docs/reference/functions/table_setPageSize.md deleted file mode 100644 index 65a82fa862..0000000000 --- a/docs/reference/functions/table_setPageSize.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setPageSize -title: table_setPageSize ---- - -# Function: table\_setPageSize() - -```ts -function table_setPageSize(table, updater): void; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:101](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L101) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<`number`\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_setPagination.md b/docs/reference/functions/table_setPagination.md deleted file mode 100644 index d0752fa6e0..0000000000 --- a/docs/reference/functions/table_setPagination.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setPagination -title: table_setPagination ---- - -# Function: table\_setPagination() - -```ts -function table_setPagination(table, updater): void | undefined; -``` - -Defined in: [features/row-pagination/rowPaginationFeature.utils.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts#L30) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<[`PaginationState`](../interfaces/PaginationState.md)\> - -## Returns - -`void` \| `undefined` diff --git a/docs/reference/functions/table_setRowPinning.md b/docs/reference/functions/table_setRowPinning.md deleted file mode 100644 index dc70b2d079..0000000000 --- a/docs/reference/functions/table_setRowPinning.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setRowPinning -title: table_setRowPinning ---- - -# Function: table\_setRowPinning() - -```ts -function table_setRowPinning(table, updater): void; -``` - -Defined in: [features/row-pinning/rowPinningFeature.utils.ts:21](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts#L21) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<[`RowPinningState`](../interfaces/RowPinningState.md)\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_setRowSelection.md b/docs/reference/functions/table_setRowSelection.md deleted file mode 100644 index a60e39c33b..0000000000 --- a/docs/reference/functions/table_setRowSelection.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setRowSelection -title: table_setRowSelection ---- - -# Function: table\_setRowSelection() - -```ts -function table_setRowSelection(table, updater): void; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:14](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L14) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<[`RowSelectionState`](../type-aliases/RowSelectionState.md)\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_setSorting.md b/docs/reference/functions/table_setSorting.md deleted file mode 100644 index 384ea33bfc..0000000000 --- a/docs/reference/functions/table_setSorting.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_setSorting -title: table_setSorting ---- - -# Function: table\_setSorting() - -```ts -function table_setSorting(table, updater): void; -``` - -Defined in: [features/row-sorting/rowSortingFeature.utils.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts#L19) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### updater - -[`Updater`](../type-aliases/Updater.md)\<[`SortingState`](../type-aliases/SortingState.md)\> - -## Returns - -`void` diff --git a/docs/reference/functions/table_toggleAllColumnsVisible.md b/docs/reference/functions/table_toggleAllColumnsVisible.md deleted file mode 100644 index bccc4ac8a4..0000000000 --- a/docs/reference/functions/table_toggleAllColumnsVisible.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_toggleAllColumnsVisible -title: table_toggleAllColumnsVisible ---- - -# Function: table\_toggleAllColumnsVisible() - -```ts -function table_toggleAllColumnsVisible(table, value?): void; -``` - -Defined in: [features/column-visibility/columnVisibilityFeature.utils.ts:132](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts#L132) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### value? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_toggleAllPageRowsSelected.md b/docs/reference/functions/table_toggleAllPageRowsSelected.md deleted file mode 100644 index 43cf3869cf..0000000000 --- a/docs/reference/functions/table_toggleAllPageRowsSelected.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_toggleAllPageRowsSelected -title: table_toggleAllPageRowsSelected ---- - -# Function: table\_toggleAllPageRowsSelected() - -```ts -function table_toggleAllPageRowsSelected(table, value?): void; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:67](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L67) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### value? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_toggleAllRowsExpanded.md b/docs/reference/functions/table_toggleAllRowsExpanded.md deleted file mode 100644 index c122626644..0000000000 --- a/docs/reference/functions/table_toggleAllRowsExpanded.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_toggleAllRowsExpanded -title: table_toggleAllRowsExpanded ---- - -# Function: table\_toggleAllRowsExpanded() - -```ts -function table_toggleAllRowsExpanded(table, expanded?): void; -``` - -Defined in: [features/row-expanding/rowExpandingFeature.utils.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts#L34) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### expanded? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/functions/table_toggleAllRowsSelected.md b/docs/reference/functions/table_toggleAllRowsSelected.md deleted file mode 100644 index e4c7740e78..0000000000 --- a/docs/reference/functions/table_toggleAllRowsSelected.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: table_toggleAllRowsSelected -title: table_toggleAllRowsSelected ---- - -# Function: table\_toggleAllRowsSelected() - -```ts -function table_toggleAllRowsSelected(table, value?): void; -``` - -Defined in: [features/row-selection/rowSelectionFeature.utils.ts:36](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts#L36) - -## Type Parameters - -### TFeatures - -`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) - -### TData - -`TData` *extends* [`RowData`](../type-aliases/RowData.md) - -## Parameters - -### table - -[`Table_Internal`](../type-aliases/Table_Internal.md)\<`TFeatures`, `TData`\> - -### value? - -`boolean` - -## Returns - -`void` diff --git a/docs/reference/index.md b/docs/reference/index.md index 28f0faba7e..63a622e631 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -203,6 +203,10 @@ title: "@tanstack/table-core" - [AssignColumnPrototype](type-aliases/AssignColumnPrototype.md) - [AssignHeaderPrototype](type-aliases/AssignHeaderPrototype.md) - [AssignRowPrototype](type-aliases/AssignRowPrototype.md) +- [Atoms](type-aliases/Atoms.md) +- [Atoms\_All](type-aliases/Atoms_All.md) +- [BaseAtoms](type-aliases/BaseAtoms.md) +- [BaseAtoms\_All](type-aliases/BaseAtoms_All.md) - [BuiltInAggregationFn](type-aliases/BuiltInAggregationFn.md) - [BuiltInFilterFn](type-aliases/BuiltInFilterFn.md) - [BuiltInSortFn](type-aliases/BuiltInSortFn.md) @@ -240,6 +244,8 @@ title: "@tanstack/table-core" - [DisplayColumnDef](type-aliases/DisplayColumnDef.md) - [ExpandedState](type-aliases/ExpandedState.md) - [ExpandedStateList](type-aliases/ExpandedStateList.md) +- [ExternalAtoms](type-aliases/ExternalAtoms.md) +- [ExternalAtoms\_All](type-aliases/ExternalAtoms_All.md) - [ExtractFeatureTypes](type-aliases/ExtractFeatureTypes.md) - [FilterFnOption](type-aliases/FilterFnOption.md) - [GetDefaultColumnDef](type-aliases/GetDefaultColumnDef.md) @@ -352,61 +358,6 @@ title: "@tanstack/table-core" - [assignTableAPIs](functions/assignTableAPIs.md) - [buildHeaderGroups](functions/buildHeaderGroups.md) - [callMemoOrStaticFn](functions/callMemoOrStaticFn.md) -- [cell\_getContext](functions/cell_getContext.md) -- [cell\_getIsAggregated](functions/cell_getIsAggregated.md) -- [cell\_getIsGrouped](functions/cell_getIsGrouped.md) -- [cell\_getIsPlaceholder](functions/cell_getIsPlaceholder.md) -- [cell\_getValue](functions/cell_getValue.md) -- [cell\_renderValue](functions/cell_renderValue.md) -- [column\_clearSorting](functions/column_clearSorting.md) -- [column\_getAfter](functions/column_getAfter.md) -- [column\_getAggregationFn](functions/column_getAggregationFn.md) -- [column\_getAutoAggregationFn](functions/column_getAutoAggregationFn.md) -- [column\_getAutoFilterFn](functions/column_getAutoFilterFn.md) -- [column\_getAutoSortDir](functions/column_getAutoSortDir.md) -- [column\_getAutoSortFn](functions/column_getAutoSortFn.md) -- [column\_getCanFilter](functions/column_getCanFilter.md) -- [column\_getCanGlobalFilter](functions/column_getCanGlobalFilter.md) -- [column\_getCanGroup](functions/column_getCanGroup.md) -- [column\_getCanHide](functions/column_getCanHide.md) -- [column\_getCanMultiSort](functions/column_getCanMultiSort.md) -- [column\_getCanPin](functions/column_getCanPin.md) -- [column\_getCanResize](functions/column_getCanResize.md) -- [column\_getCanSort](functions/column_getCanSort.md) -- [column\_getFacetedMinMaxValues](functions/column_getFacetedMinMaxValues.md) -- [column\_getFacetedRowModel](functions/column_getFacetedRowModel.md) -- [column\_getFacetedUniqueValues](functions/column_getFacetedUniqueValues.md) -- [column\_getFilterFn](functions/column_getFilterFn.md) -- [column\_getFilterIndex](functions/column_getFilterIndex.md) -- [column\_getFilterValue](functions/column_getFilterValue.md) -- [column\_getFirstSortDir](functions/column_getFirstSortDir.md) -- [column\_getFlatColumns](functions/column_getFlatColumns.md) -- [column\_getGroupedIndex](functions/column_getGroupedIndex.md) -- [column\_getIndex](functions/column_getIndex.md) -- [column\_getIsFiltered](functions/column_getIsFiltered.md) -- [column\_getIsFirstColumn](functions/column_getIsFirstColumn.md) -- [column\_getIsGrouped](functions/column_getIsGrouped.md) -- [column\_getIsLastColumn](functions/column_getIsLastColumn.md) -- [column\_getIsPinned](functions/column_getIsPinned.md) -- [column\_getIsResizing](functions/column_getIsResizing.md) -- [column\_getIsSorted](functions/column_getIsSorted.md) -- [column\_getIsVisible](functions/column_getIsVisible.md) -- [column\_getLeafColumns](functions/column_getLeafColumns.md) -- [column\_getNextSortingOrder](functions/column_getNextSortingOrder.md) -- [column\_getPinnedIndex](functions/column_getPinnedIndex.md) -- [column\_getSize](functions/column_getSize.md) -- [column\_getSortFn](functions/column_getSortFn.md) -- [column\_getSortIndex](functions/column_getSortIndex.md) -- [column\_getStart](functions/column_getStart.md) -- [column\_getToggleGroupingHandler](functions/column_getToggleGroupingHandler.md) -- [column\_getToggleSortingHandler](functions/column_getToggleSortingHandler.md) -- [column\_getToggleVisibilityHandler](functions/column_getToggleVisibilityHandler.md) -- [column\_pin](functions/column_pin.md) -- [column\_resetSize](functions/column_resetSize.md) -- [column\_setFilterValue](functions/column_setFilterValue.md) -- [column\_toggleGrouping](functions/column_toggleGrouping.md) -- [column\_toggleSorting](functions/column_toggleSorting.md) -- [column\_toggleVisibility](functions/column_toggleVisibility.md) - [constructCell](functions/constructCell.md) - [constructColumn](functions/constructColumn.md) - [constructColumnFacetingFeature](functions/constructColumnFacetingFeature.md) @@ -444,202 +395,17 @@ title: "@tanstack/table-core" - [createGroupedRowModel](functions/createGroupedRowModel.md) - [createPaginatedRowModel](functions/createPaginatedRowModel.md) - [createSortedRowModel](functions/createSortedRowModel.md) -- [createTableStore](functions/createTableStore.md) - [expandRows](functions/expandRows.md) - [flattenBy](functions/flattenBy.md) - [functionalUpdate](functions/functionalUpdate.md) -- [getDefaultColumnFiltersState](functions/getDefaultColumnFiltersState.md) -- [getDefaultColumnOrderState](functions/getDefaultColumnOrderState.md) -- [getDefaultColumnPinningState](functions/getDefaultColumnPinningState.md) -- [getDefaultColumnResizingState](functions/getDefaultColumnResizingState.md) -- [getDefaultColumnSizingColumnDef](functions/getDefaultColumnSizingColumnDef.md) -- [getDefaultColumnSizingState](functions/getDefaultColumnSizingState.md) -- [getDefaultColumnVisibilityState](functions/getDefaultColumnVisibilityState.md) -- [getDefaultExpandedState](functions/getDefaultExpandedState.md) -- [getDefaultGroupingState](functions/getDefaultGroupingState.md) -- [getDefaultPaginationState](functions/getDefaultPaginationState.md) -- [getDefaultRowPinningState](functions/getDefaultRowPinningState.md) -- [getDefaultRowSelectionState](functions/getDefaultRowSelectionState.md) -- [getDefaultSortingState](functions/getDefaultSortingState.md) - [getFunctionNameInfo](functions/getFunctionNameInfo.md) - [getInitialTableState](functions/getInitialTableState.md) - [getMemoFnMeta](functions/getMemoFnMeta.md) -- [header\_getContext](functions/header_getContext.md) -- [header\_getLeafHeaders](functions/header_getLeafHeaders.md) -- [header\_getResizeHandler](functions/header_getResizeHandler.md) -- [header\_getSize](functions/header_getSize.md) -- [header\_getStart](functions/header_getStart.md) - [isFunction](functions/isFunction.md) - [isNumberArray](functions/isNumberArray.md) -- [isRowSelected](functions/isRowSelected.md) -- [isSubRowSelected](functions/isSubRowSelected.md) -- [isTouchStartEvent](functions/isTouchStartEvent.md) - [makeStateUpdater](functions/makeStateUpdater.md) - [memo](functions/memo.md) - [noop](functions/noop.md) -- [orderColumns](functions/orderColumns.md) -- [passiveEventSupported](functions/passiveEventSupported.md) -- [row\_getAllCells](functions/row_getAllCells.md) -- [row\_getAllCellsByColumnId](functions/row_getAllCellsByColumnId.md) -- [row\_getAllVisibleCells](functions/row_getAllVisibleCells.md) -- [row\_getCanExpand](functions/row_getCanExpand.md) -- [row\_getCanMultiSelect](functions/row_getCanMultiSelect.md) -- [row\_getCanPin](functions/row_getCanPin.md) -- [row\_getCanSelect](functions/row_getCanSelect.md) -- [row\_getCanSelectSubRows](functions/row_getCanSelectSubRows.md) -- [row\_getCenterVisibleCells](functions/row_getCenterVisibleCells.md) -- [row\_getGroupingValue](functions/row_getGroupingValue.md) -- [row\_getIsAllParentsExpanded](functions/row_getIsAllParentsExpanded.md) -- [row\_getIsAllSubRowsSelected](functions/row_getIsAllSubRowsSelected.md) -- [row\_getIsExpanded](functions/row_getIsExpanded.md) -- [row\_getIsGrouped](functions/row_getIsGrouped.md) -- [row\_getIsPinned](functions/row_getIsPinned.md) -- [row\_getIsSelected](functions/row_getIsSelected.md) -- [row\_getIsSomeSelected](functions/row_getIsSomeSelected.md) -- [row\_getLeafRows](functions/row_getLeafRows.md) -- [row\_getLeftVisibleCells](functions/row_getLeftVisibleCells.md) -- [row\_getParentRow](functions/row_getParentRow.md) -- [row\_getParentRows](functions/row_getParentRows.md) -- [row\_getPinnedIndex](functions/row_getPinnedIndex.md) -- [row\_getRightVisibleCells](functions/row_getRightVisibleCells.md) -- [row\_getToggleExpandedHandler](functions/row_getToggleExpandedHandler.md) -- [row\_getToggleSelectedHandler](functions/row_getToggleSelectedHandler.md) -- [row\_getUniqueValues](functions/row_getUniqueValues.md) -- [row\_getValue](functions/row_getValue.md) -- [row\_getVisibleCells](functions/row_getVisibleCells.md) -- [row\_pin](functions/row_pin.md) -- [row\_renderValue](functions/row_renderValue.md) -- [row\_toggleExpanded](functions/row_toggleExpanded.md) -- [row\_toggleSelected](functions/row_toggleSelected.md) -- [selectRowsFn](functions/selectRowsFn.md) -- [shouldAutoRemoveFilter](functions/shouldAutoRemoveFilter.md) -- [table\_autoResetExpanded](functions/table_autoResetExpanded.md) -- [table\_autoResetPageIndex](functions/table_autoResetPageIndex.md) -- [table\_firstPage](functions/table_firstPage.md) -- [table\_getAllColumns](functions/table_getAllColumns.md) -- [table\_getAllFlatColumns](functions/table_getAllFlatColumns.md) -- [table\_getAllFlatColumnsById](functions/table_getAllFlatColumnsById.md) -- [table\_getAllLeafColumns](functions/table_getAllLeafColumns.md) -- [table\_getBottomRows](functions/table_getBottomRows.md) -- [table\_getCanNextPage](functions/table_getCanNextPage.md) -- [table\_getCanPreviousPage](functions/table_getCanPreviousPage.md) -- [table\_getCanSomeRowsExpand](functions/table_getCanSomeRowsExpand.md) -- [table\_getCenterFlatHeaders](functions/table_getCenterFlatHeaders.md) -- [table\_getCenterFooterGroups](functions/table_getCenterFooterGroups.md) -- [table\_getCenterHeaderGroups](functions/table_getCenterHeaderGroups.md) -- [table\_getCenterLeafColumns](functions/table_getCenterLeafColumns.md) -- [table\_getCenterLeafHeaders](functions/table_getCenterLeafHeaders.md) -- [table\_getCenterRows](functions/table_getCenterRows.md) -- [table\_getCenterTotalSize](functions/table_getCenterTotalSize.md) -- [table\_getCenterVisibleLeafColumns](functions/table_getCenterVisibleLeafColumns.md) -- [table\_getColumn](functions/table_getColumn.md) -- [table\_getCoreRowModel](functions/table_getCoreRowModel.md) -- [table\_getDefaultColumnDef](functions/table_getDefaultColumnDef.md) -- [table\_getExpandedDepth](functions/table_getExpandedDepth.md) -- [table\_getExpandedRowModel](functions/table_getExpandedRowModel.md) -- [table\_getFilteredRowModel](functions/table_getFilteredRowModel.md) -- [table\_getFilteredSelectedRowModel](functions/table_getFilteredSelectedRowModel.md) -- [table\_getFlatHeaders](functions/table_getFlatHeaders.md) -- [table\_getFooterGroups](functions/table_getFooterGroups.md) -- [table\_getGlobalAutoFilterFn](functions/table_getGlobalAutoFilterFn.md) -- [table\_getGlobalFacetedMinMaxValues](functions/table_getGlobalFacetedMinMaxValues.md) -- [table\_getGlobalFacetedRowModel](functions/table_getGlobalFacetedRowModel.md) -- [table\_getGlobalFacetedUniqueValues](functions/table_getGlobalFacetedUniqueValues.md) -- [table\_getGlobalFilterFn](functions/table_getGlobalFilterFn.md) -- [table\_getGroupedRowModel](functions/table_getGroupedRowModel.md) -- [table\_getGroupedSelectedRowModel](functions/table_getGroupedSelectedRowModel.md) -- [table\_getHeaderGroups](functions/table_getHeaderGroups.md) -- [table\_getIsAllColumnsVisible](functions/table_getIsAllColumnsVisible.md) -- [table\_getIsAllPageRowsSelected](functions/table_getIsAllPageRowsSelected.md) -- [table\_getIsAllRowsExpanded](functions/table_getIsAllRowsExpanded.md) -- [table\_getIsAllRowsSelected](functions/table_getIsAllRowsSelected.md) -- [table\_getIsSomeColumnsPinned](functions/table_getIsSomeColumnsPinned.md) -- [table\_getIsSomeColumnsVisible](functions/table_getIsSomeColumnsVisible.md) -- [table\_getIsSomePageRowsSelected](functions/table_getIsSomePageRowsSelected.md) -- [table\_getIsSomeRowsExpanded](functions/table_getIsSomeRowsExpanded.md) -- [table\_getIsSomeRowsPinned](functions/table_getIsSomeRowsPinned.md) -- [table\_getIsSomeRowsSelected](functions/table_getIsSomeRowsSelected.md) -- [table\_getLeafHeaders](functions/table_getLeafHeaders.md) -- [table\_getLeftFlatHeaders](functions/table_getLeftFlatHeaders.md) -- [table\_getLeftFooterGroups](functions/table_getLeftFooterGroups.md) -- [table\_getLeftHeaderGroups](functions/table_getLeftHeaderGroups.md) -- [table\_getLeftLeafColumns](functions/table_getLeftLeafColumns.md) -- [table\_getLeftLeafHeaders](functions/table_getLeftLeafHeaders.md) -- [table\_getLeftTotalSize](functions/table_getLeftTotalSize.md) -- [table\_getLeftVisibleLeafColumns](functions/table_getLeftVisibleLeafColumns.md) -- [table\_getOrderColumnsFn](functions/table_getOrderColumnsFn.md) -- [table\_getPageCount](functions/table_getPageCount.md) -- [table\_getPageOptions](functions/table_getPageOptions.md) -- [table\_getPaginatedRowModel](functions/table_getPaginatedRowModel.md) -- [table\_getPinnedLeafColumns](functions/table_getPinnedLeafColumns.md) -- [table\_getPinnedVisibleLeafColumns](functions/table_getPinnedVisibleLeafColumns.md) -- [table\_getPreExpandedRowModel](functions/table_getPreExpandedRowModel.md) -- [table\_getPreFilteredRowModel](functions/table_getPreFilteredRowModel.md) -- [table\_getPreGroupedRowModel](functions/table_getPreGroupedRowModel.md) -- [table\_getPrePaginatedRowModel](functions/table_getPrePaginatedRowModel.md) -- [table\_getPreSelectedRowModel](functions/table_getPreSelectedRowModel.md) -- [table\_getPreSortedRowModel](functions/table_getPreSortedRowModel.md) -- [table\_getRightFlatHeaders](functions/table_getRightFlatHeaders.md) -- [table\_getRightFooterGroups](functions/table_getRightFooterGroups.md) -- [table\_getRightHeaderGroups](functions/table_getRightHeaderGroups.md) -- [table\_getRightLeafColumns](functions/table_getRightLeafColumns.md) -- [table\_getRightLeafHeaders](functions/table_getRightLeafHeaders.md) -- [table\_getRightTotalSize](functions/table_getRightTotalSize.md) -- [table\_getRightVisibleLeafColumns](functions/table_getRightVisibleLeafColumns.md) -- [table\_getRow](functions/table_getRow.md) -- [table\_getRowCount](functions/table_getRowCount.md) -- [table\_getRowId](functions/table_getRowId.md) -- [table\_getRowModel](functions/table_getRowModel.md) -- [table\_getSelectedRowModel](functions/table_getSelectedRowModel.md) -- [table\_getSortedRowModel](functions/table_getSortedRowModel.md) -- [table\_getToggleAllColumnsVisibilityHandler](functions/table_getToggleAllColumnsVisibilityHandler.md) -- [table\_getToggleAllPageRowsSelectedHandler](functions/table_getToggleAllPageRowsSelectedHandler.md) -- [table\_getToggleAllRowsExpandedHandler](functions/table_getToggleAllRowsExpandedHandler.md) -- [table\_getToggleAllRowsSelectedHandler](functions/table_getToggleAllRowsSelectedHandler.md) -- [table\_getTopRows](functions/table_getTopRows.md) -- [table\_getTotalSize](functions/table_getTotalSize.md) -- [table\_getVisibleFlatColumns](functions/table_getVisibleFlatColumns.md) -- [table\_getVisibleLeafColumns](functions/table_getVisibleLeafColumns.md) -- [table\_lastPage](functions/table_lastPage.md) -- [table\_mergeOptions](functions/table_mergeOptions.md) -- [table\_nextPage](functions/table_nextPage.md) -- [table\_previousPage](functions/table_previousPage.md) -- [table\_reset](functions/table_reset.md) -- [table\_resetColumnFilters](functions/table_resetColumnFilters.md) -- [table\_resetColumnOrder](functions/table_resetColumnOrder.md) -- [table\_resetColumnPinning](functions/table_resetColumnPinning.md) -- [table\_resetColumnSizing](functions/table_resetColumnSizing.md) -- [table\_resetColumnVisibility](functions/table_resetColumnVisibility.md) -- [table\_resetExpanded](functions/table_resetExpanded.md) -- [table\_resetGlobalFilter](functions/table_resetGlobalFilter.md) -- [table\_resetGrouping](functions/table_resetGrouping.md) -- [table\_resetHeaderSizeInfo](functions/table_resetHeaderSizeInfo.md) -- [table\_resetPageIndex](functions/table_resetPageIndex.md) -- [table\_resetPageSize](functions/table_resetPageSize.md) -- [table\_resetPagination](functions/table_resetPagination.md) -- [table\_resetRowPinning](functions/table_resetRowPinning.md) -- [table\_resetRowSelection](functions/table_resetRowSelection.md) -- [table\_resetSorting](functions/table_resetSorting.md) -- [table\_setColumnFilters](functions/table_setColumnFilters.md) -- [table\_setColumnOrder](functions/table_setColumnOrder.md) -- [table\_setColumnPinning](functions/table_setColumnPinning.md) -- [table\_setColumnResizing](functions/table_setColumnResizing.md) -- [table\_setColumnSizing](functions/table_setColumnSizing.md) -- [table\_setColumnVisibility](functions/table_setColumnVisibility.md) -- [table\_setExpanded](functions/table_setExpanded.md) -- [table\_setGlobalFilter](functions/table_setGlobalFilter.md) -- [table\_setGrouping](functions/table_setGrouping.md) -- [table\_setOptions](functions/table_setOptions.md) -- [table\_setPageIndex](functions/table_setPageIndex.md) -- [table\_setPageSize](functions/table_setPageSize.md) -- [table\_setPagination](functions/table_setPagination.md) -- [table\_setRowPinning](functions/table_setRowPinning.md) -- [table\_setRowSelection](functions/table_setRowSelection.md) -- [table\_setSorting](functions/table_setSorting.md) -- [table\_toggleAllColumnsVisible](functions/table_toggleAllColumnsVisible.md) -- [table\_toggleAllPageRowsSelected](functions/table_toggleAllPageRowsSelected.md) -- [table\_toggleAllRowsExpanded](functions/table_toggleAllRowsExpanded.md) -- [table\_toggleAllRowsSelected](functions/table_toggleAllRowsSelected.md) - [tableFeatures](functions/tableFeatures.md) - [tableMemo](functions/tableMemo.md) - [tableOptions](functions/tableOptions.md) diff --git a/docs/reference/interfaces/API.md b/docs/reference/interfaces/API.md index 0db647d0fb..965a832ca8 100644 --- a/docs/reference/interfaces/API.md +++ b/docs/reference/interfaces/API.md @@ -5,7 +5,7 @@ title: API # Interface: API\ -Defined in: [utils.ts:267](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L267) +Defined in: [utils.ts:262](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L262) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [utils.ts:267](https://github.com/TanStack/table/blob/main/packages/ fn: (...args) => any; ``` -Defined in: [utils.ts:268](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L268) +Defined in: [utils.ts:263](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L263) #### Parameters @@ -45,7 +45,7 @@ Defined in: [utils.ts:268](https://github.com/TanStack/table/blob/main/packages/ optional memoDeps: (depArgs?) => any[] | undefined; ``` -Defined in: [utils.ts:269](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L269) +Defined in: [utils.ts:264](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L264) #### Parameters diff --git a/docs/reference/interfaces/PrototypeAPI.md b/docs/reference/interfaces/PrototypeAPI.md index d20ace6d67..635c712875 100644 --- a/docs/reference/interfaces/PrototypeAPI.md +++ b/docs/reference/interfaces/PrototypeAPI.md @@ -5,7 +5,7 @@ title: PrototypeAPI # Interface: PrototypeAPI\ -Defined in: [utils.ts:322](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L322) +Defined in: [utils.ts:317](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L317) ## Type Parameters @@ -25,7 +25,7 @@ Defined in: [utils.ts:322](https://github.com/TanStack/table/blob/main/packages/ fn: (self, ...args) => any; ``` -Defined in: [utils.ts:323](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L323) +Defined in: [utils.ts:318](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L318) #### Parameters @@ -49,7 +49,7 @@ Defined in: [utils.ts:323](https://github.com/TanStack/table/blob/main/packages/ optional memoDeps: (self, depArgs?) => any[] | undefined; ``` -Defined in: [utils.ts:324](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L324) +Defined in: [utils.ts:319](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L319) #### Parameters diff --git a/docs/reference/interfaces/TableOptions_Core.md b/docs/reference/interfaces/TableOptions_Core.md index 30af4d63dc..a14c7a5cac 100644 --- a/docs/reference/interfaces/TableOptions_Core.md +++ b/docs/reference/interfaces/TableOptions_Core.md @@ -29,7 +29,7 @@ Defined in: [types/TableOptions.ts:27](https://github.com/TanStack/table/blob/ma _features: TFeatures; ``` -Defined in: [core/table/coreTablesFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L22) +Defined in: [core/table/coreTablesFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L69) The features that you want to enable for the table. @@ -45,7 +45,7 @@ The features that you want to enable for the table. optional _rowModels: CreateRowModels_All; ``` -Defined in: [core/table/coreTablesFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L26) +Defined in: [core/table/coreTablesFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L73) The row model options that you want to enable for the table. @@ -55,13 +55,33 @@ The row model options that you want to enable for the table. *** +### atoms? + +```ts +optional atoms: Partial<{ [K in string | number | symbol]: Atom[K]> }>; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L81) + +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]` +and the internal base atom for that slice. Writes originating from the library are +still routed through the internal base atom; consumers are responsible for +mirroring changes back to their external atom via the corresponding `onXChange` callback. + +#### Inherited from + +[`TableOptions_Table`](TableOptions_Table.md).[`atoms`](TableOptions_Table.md#atoms) + +*** + ### autoResetAll? ```ts optional autoResetAll: boolean; ``` -Defined in: [core/table/coreTablesFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L30) +Defined in: [core/table/coreTablesFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L85) Set this option to override any of the `autoReset...` feature options. @@ -93,7 +113,7 @@ The array of column defs to use for the table. data: readonly TData[]; ``` -Defined in: [core/table/coreTablesFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L34) +Defined in: [core/table/coreTablesFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L89) The data for the table to display. When the `data` option changes reference, the table will reprocess the data. @@ -201,7 +221,7 @@ getSubRows: row => row.subRows optional initialState: Partial>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L39) +Defined in: [core/table/coreTablesFeature.types.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L94) Use this option to optionally pass initial state to the table. This state will be used when resetting various table states either automatically by the table (eg. `options.autoResetPageIndex`) or via functions like `table.resetRowSelection()`. Most reset function allow you optionally pass a flag to reset to a blank/default state instead of the initial state. Table state will not be reset when this object changes, which also means that the initial state object does not need to be stable. @@ -218,7 +238,7 @@ Table state will not be reset when this object changes, which also means that th optional mergeOptions: (defaultOptions, options) => TableOptions; ``` -Defined in: [core/table/coreTablesFeature.types.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L43) +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) This option is used to optionally implement the merging of table options. @@ -248,7 +268,7 @@ This option is used to optionally implement the merging of table options. optional meta: TableMeta; ``` -Defined in: [core/table/coreTablesFeature.types.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L50) +Defined in: [core/table/coreTablesFeature.types.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L105) You can pass any object to `options.meta` and access it anywhere the `table` is available via `table.options.meta`. @@ -280,26 +300,10 @@ Value used when the desired value is not found in the data. optional state: Partial>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L54) +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) Pass in individual self-managed state to the table. #### Inherited from [`TableOptions_Table`](TableOptions_Table.md).[`state`](TableOptions_Table.md#state) - -*** - -### store? - -```ts -optional store: Store, never>; -``` - -Defined in: [core/table/coreTablesFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L58) - -Optionally, provide your own external TanStack Store instance if you want to manage the table state externally. - -#### Inherited from - -[`TableOptions_Table`](TableOptions_Table.md).[`store`](TableOptions_Table.md#store) diff --git a/docs/reference/interfaces/TableOptions_Table.md b/docs/reference/interfaces/TableOptions_Table.md index c8b86644a7..dd3e195321 100644 --- a/docs/reference/interfaces/TableOptions_Table.md +++ b/docs/reference/interfaces/TableOptions_Table.md @@ -5,7 +5,7 @@ title: TableOptions_Table # Interface: TableOptions\_Table\ -Defined in: [core/table/coreTablesFeature.types.ts:15](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L15) +Defined in: [core/table/coreTablesFeature.types.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L62) ## Extended by @@ -29,7 +29,7 @@ Defined in: [core/table/coreTablesFeature.types.ts:15](https://github.com/TanSta _features: TFeatures; ``` -Defined in: [core/table/coreTablesFeature.types.ts:22](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L22) +Defined in: [core/table/coreTablesFeature.types.ts:69](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L69) The features that you want to enable for the table. @@ -41,19 +41,35 @@ The features that you want to enable for the table. optional _rowModels: CreateRowModels_All; ``` -Defined in: [core/table/coreTablesFeature.types.ts:26](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L26) +Defined in: [core/table/coreTablesFeature.types.ts:73](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L73) The row model options that you want to enable for the table. *** +### atoms? + +```ts +optional atoms: Partial<{ [K in string | number | symbol]: Atom[K]> }>; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:81](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L81) + +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]` +and the internal base atom for that slice. Writes originating from the library are +still routed through the internal base atom; consumers are responsible for +mirroring changes back to their external atom via the corresponding `onXChange` callback. + +*** + ### autoResetAll? ```ts optional autoResetAll: boolean; ``` -Defined in: [core/table/coreTablesFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L30) +Defined in: [core/table/coreTablesFeature.types.ts:85](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L85) Set this option to override any of the `autoReset...` feature options. @@ -65,7 +81,7 @@ Set this option to override any of the `autoReset...` feature options. data: readonly TData[]; ``` -Defined in: [core/table/coreTablesFeature.types.ts:34](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L34) +Defined in: [core/table/coreTablesFeature.types.ts:89](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L89) The data for the table to display. When the `data` option changes reference, the table will reprocess the data. @@ -77,7 +93,7 @@ The data for the table to display. When the `data` option changes reference, the optional initialState: Partial>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L39) +Defined in: [core/table/coreTablesFeature.types.ts:94](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L94) Use this option to optionally pass initial state to the table. This state will be used when resetting various table states either automatically by the table (eg. `options.autoResetPageIndex`) or via functions like `table.resetRowSelection()`. Most reset function allow you optionally pass a flag to reset to a blank/default state instead of the initial state. Table state will not be reset when this object changes, which also means that the initial state object does not need to be stable. @@ -90,7 +106,7 @@ Table state will not be reset when this object changes, which also means that th optional mergeOptions: (defaultOptions, options) => TableOptions; ``` -Defined in: [core/table/coreTablesFeature.types.ts:43](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L43) +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) This option is used to optionally implement the merging of table options. @@ -116,7 +132,7 @@ This option is used to optionally implement the merging of table options. optional meta: TableMeta; ``` -Defined in: [core/table/coreTablesFeature.types.ts:50](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L50) +Defined in: [core/table/coreTablesFeature.types.ts:105](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L105) You can pass any object to `options.meta` and access it anywhere the `table` is available via `table.options.meta`. @@ -128,18 +144,6 @@ You can pass any object to `options.meta` and access it anywhere the `table` is optional state: Partial>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:54](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L54) +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) Pass in individual self-managed state to the table. - -*** - -### store? - -```ts -optional store: Store, never>; -``` - -Defined in: [core/table/coreTablesFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L58) - -Optionally, provide your own external TanStack Store instance if you want to manage the table state externally. diff --git a/docs/reference/interfaces/Table_CoreProperties.md b/docs/reference/interfaces/Table_CoreProperties.md index b362b38843..39a390dbfb 100644 --- a/docs/reference/interfaces/Table_CoreProperties.md +++ b/docs/reference/interfaces/Table_CoreProperties.md @@ -5,7 +5,7 @@ title: Table_CoreProperties # Interface: Table\_CoreProperties\ -Defined in: [core/table/coreTablesFeature.types.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L61) +Defined in: [core/table/coreTablesFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L112) ## Extended by @@ -29,7 +29,7 @@ Defined in: [core/table/coreTablesFeature.types.ts:61](https://github.com/TanSta optional _cellPrototype: object; ``` -Defined in: [core/table/coreTablesFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L72) +Defined in: [core/table/coreTablesFeature.types.ts:123](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L123) 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:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L76) +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) 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 _features: Partial & TFeatures; ``` -Defined in: [core/table/coreTablesFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L68) +Defined in: [core/table/coreTablesFeature.types.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L119) 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:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L80) +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) 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 _rowModelFns: RowModelFns; ``` -Defined in: [core/table/coreTablesFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L84) +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) The row model processing functions that are used to process the data by features. @@ -89,7 +89,7 @@ The row model processing functions that are used to process the data by features _rowModels: CachedRowModels; ``` -Defined in: [core/table/coreTablesFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L88) +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) The row models that are enabled for the table. @@ -101,21 +101,36 @@ The row models that are enabled for the table. optional _rowPrototype: object; ``` -Defined in: [core/table/coreTablesFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L92) +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) Prototype cache for Row objects - shared by all rows in this table *** -### baseStore +### atoms + +```ts +atoms: Atoms; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:154](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L154) + +The readonly derived atoms for each `TableState` slice. Each derives from +its corresponding `baseAtom` plus, optionally, a per-slice external atom or +external state value (precedence: external atom > external state > base atom). + +*** + +### baseAtoms ```ts -baseStore: Store>; +baseAtoms: BaseAtoms; ``` -Defined in: [core/table/coreTablesFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L96) +Defined in: [core/table/coreTablesFeature.types.ts:148](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L148) -The base store for the table. This can be used to write to the table state. +The internal writable atoms for each `TableState` slice. This is the library's +single write surface — all state mutations from features land here. *** @@ -125,7 +140,7 @@ The base store for the table. This can be used to write to the table state. initialState: TableState; ``` -Defined in: [core/table/coreTablesFeature.types.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L104) +Defined in: [core/table/coreTablesFeature.types.ts:162](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L162) This is the resolved initial state of the table. @@ -137,7 +152,7 @@ This is the resolved initial state of the table. readonly options: TableOptions; ``` -Defined in: [core/table/coreTablesFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L108) +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) A read-only reference to the table's current options. @@ -149,7 +164,7 @@ A read-only reference to the table's current options. optionsStore: Store>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L100) +Defined in: [core/table/coreTablesFeature.types.ts:158](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L158) The base store for the table options. @@ -161,6 +176,7 @@ The base store for the table options. store: ReadonlyStore>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L112) +Defined in: [core/table/coreTablesFeature.types.ts:171](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L171) -Where the table state is stored. +The readonly flat store for the table state. Derives from `table.atoms` +only; never reads external state directly. diff --git a/docs/reference/interfaces/Table_Plugins.md b/docs/reference/interfaces/Table_Plugins.md index 7bf41ce48f..874bd90101 100644 --- a/docs/reference/interfaces/Table_Plugins.md +++ b/docs/reference/interfaces/Table_Plugins.md @@ -5,7 +5,7 @@ title: Table_Plugins # Interface: Table\_Plugins\ -Defined in: [types/Table.ts:32](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L32) +Defined in: [types/Table.ts:37](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L37) Use this interface as a target for declaration merging to add your own plugin properties. Note: This will affect the types of all tables in your project. diff --git a/docs/reference/interfaces/Table_Table.md b/docs/reference/interfaces/Table_Table.md index c54b8ceacc..23daa95ab2 100644 --- a/docs/reference/interfaces/Table_Table.md +++ b/docs/reference/interfaces/Table_Table.md @@ -5,7 +5,7 @@ title: Table_Table # Interface: Table\_Table\ -Defined in: [core/table/coreTablesFeature.types.ts:115](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L115) +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) ## Extends @@ -29,7 +29,7 @@ Defined in: [core/table/coreTablesFeature.types.ts:115](https://github.com/TanSt optional _cellPrototype: object; ``` -Defined in: [core/table/coreTablesFeature.types.ts:72](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L72) +Defined in: [core/table/coreTablesFeature.types.ts:123](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L123) 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:76](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L76) +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) 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 _features: Partial & TFeatures; ``` -Defined in: [core/table/coreTablesFeature.types.ts:68](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L68) +Defined in: [core/table/coreTablesFeature.types.ts:119](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L119) 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:80](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L80) +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) 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 _rowModelFns: RowModelFns; ``` -Defined in: [core/table/coreTablesFeature.types.ts:84](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L84) +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) The row model processing functions that are used to process the data by features. @@ -109,7 +109,7 @@ The row model processing functions that are used to process the data by features _rowModels: CachedRowModels; ``` -Defined in: [core/table/coreTablesFeature.types.ts:88](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L88) +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) The row models that are enabled for the table. @@ -125,7 +125,7 @@ The row models that are enabled for the table. optional _rowPrototype: object; ``` -Defined in: [core/table/coreTablesFeature.types.ts:92](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L92) +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) Prototype cache for Row objects - shared by all rows in this table @@ -135,19 +135,38 @@ Prototype cache for Row objects - shared by all rows in this table *** -### baseStore +### atoms ```ts -baseStore: Store>; +atoms: Atoms; ``` -Defined in: [core/table/coreTablesFeature.types.ts:96](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L96) +Defined in: [core/table/coreTablesFeature.types.ts:154](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L154) -The base store for the table. This can be used to write to the table state. +The readonly derived atoms for each `TableState` slice. Each derives from +its corresponding `baseAtom` plus, optionally, a per-slice external atom or +external state value (precedence: external atom > external state > base atom). #### Inherited from -[`Table_CoreProperties`](Table_CoreProperties.md).[`baseStore`](Table_CoreProperties.md#basestore) +[`Table_CoreProperties`](Table_CoreProperties.md).[`atoms`](Table_CoreProperties.md#atoms) + +*** + +### baseAtoms + +```ts +baseAtoms: BaseAtoms; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:148](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L148) + +The internal writable atoms for each `TableState` slice. This is the library's +single write surface — all state mutations from features land here. + +#### Inherited from + +[`Table_CoreProperties`](Table_CoreProperties.md).[`baseAtoms`](Table_CoreProperties.md#baseatoms) *** @@ -157,7 +176,7 @@ The base store for the table. This can be used to write to the table state. initialState: TableState; ``` -Defined in: [core/table/coreTablesFeature.types.ts:104](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L104) +Defined in: [core/table/coreTablesFeature.types.ts:162](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L162) This is the resolved initial state of the table. @@ -173,7 +192,7 @@ This is the resolved initial state of the table. readonly options: TableOptions; ``` -Defined in: [core/table/coreTablesFeature.types.ts:108](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L108) +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) A read-only reference to the table's current options. @@ -189,7 +208,7 @@ A read-only reference to the table's current options. optionsStore: Store>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:100](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L100) +Defined in: [core/table/coreTablesFeature.types.ts:158](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L158) The base store for the table options. @@ -205,7 +224,7 @@ The base store for the table options. reset: () => void; ``` -Defined in: [core/table/coreTablesFeature.types.ts:122](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L122) +Defined in: [core/table/coreTablesFeature.types.ts:181](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L181) Call this function to reset the table state to the initial state. @@ -221,7 +240,7 @@ Call this function to reset the table state to the initial state. setOptions: (newOptions) => void; ``` -Defined in: [core/table/coreTablesFeature.types.ts:126](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L126) +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) This function can be used to update the table options. @@ -243,9 +262,10 @@ This function can be used to update the table options. store: ReadonlyStore>; ``` -Defined in: [core/table/coreTablesFeature.types.ts:112](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L112) +Defined in: [core/table/coreTablesFeature.types.ts:171](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L171) -Where the table state is stored. +The readonly flat store for the table state. Derives from `table.atoms` +only; never reads external state directly. #### Inherited from diff --git a/docs/reference/type-aliases/APIObject.md b/docs/reference/type-aliases/APIObject.md index 937884aa0e..7064f37ec3 100644 --- a/docs/reference/type-aliases/APIObject.md +++ b/docs/reference/type-aliases/APIObject.md @@ -9,7 +9,7 @@ title: APIObject type APIObject = Record>; ``` -Defined in: [utils.ts:272](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L272) +Defined in: [utils.ts:267](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L267) ## Type Parameters diff --git a/docs/reference/type-aliases/Atoms.md b/docs/reference/type-aliases/Atoms.md new file mode 100644 index 0000000000..0c1dde197e --- /dev/null +++ b/docs/reference/type-aliases/Atoms.md @@ -0,0 +1,24 @@ +--- +id: Atoms +title: Atoms +--- + +# Type Alias: Atoms\ + +```ts +type Atoms = { [K in keyof TableState]-?: ReadonlyAtom[K]> }; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:30](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L30) + +A map of readonly derived atoms, one per `TableState` slice. Each derives +from its corresponding `baseAtom` plus, optionally, a per-slice external +atom or external state value. + +Precedence: `options.atoms[key]` > `options.state[key]` > `baseAtoms[key]`. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) diff --git a/docs/reference/type-aliases/Atoms_All.md b/docs/reference/type-aliases/Atoms_All.md new file mode 100644 index 0000000000..3f02299b1f --- /dev/null +++ b/docs/reference/type-aliases/Atoms_All.md @@ -0,0 +1,12 @@ +--- +id: Atoms_All +title: Atoms_All +--- + +# Type Alias: Atoms\_All + +```ts +type Atoms_All = { [K in keyof TableState_All]-?: ReadonlyAtom }; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:55](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L55) diff --git a/docs/reference/type-aliases/BaseAtoms.md b/docs/reference/type-aliases/BaseAtoms.md new file mode 100644 index 0000000000..2f4e8b55bd --- /dev/null +++ b/docs/reference/type-aliases/BaseAtoms.md @@ -0,0 +1,21 @@ +--- +id: BaseAtoms +title: BaseAtoms +--- + +# Type Alias: BaseAtoms\ + +```ts +type BaseAtoms = { [K in keyof TableState]-?: Atom[K]> }; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:19](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L19) + +A map of writable atoms, one per `TableState` slice. These are the internal +writable atoms that the library always writes to via `makeStateUpdater`. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) diff --git a/docs/reference/type-aliases/BaseAtoms_All.md b/docs/reference/type-aliases/BaseAtoms_All.md new file mode 100644 index 0000000000..3c144270e7 --- /dev/null +++ b/docs/reference/type-aliases/BaseAtoms_All.md @@ -0,0 +1,20 @@ +--- +id: BaseAtoms_All +title: BaseAtoms_All +--- + +# Type Alias: BaseAtoms\_All + +```ts +type BaseAtoms_All = { [K in keyof TableState_All]-?: Atom }; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:52](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L52) + +Internal "all features" flat variants of the atom types. `Table_Internal` +uses these so feature code (written generically over `TFeatures`) can access +any slice atom (e.g. `table.atoms.columnPinning`) without TypeScript +narrowing away slices that aren't in the current `TFeatures` union. + +This mirrors the pre-refactor pattern where `Table_Internal` overrode +`store: ReadonlyStore` for the same reason. diff --git a/docs/reference/type-aliases/ExternalAtoms.md b/docs/reference/type-aliases/ExternalAtoms.md new file mode 100644 index 0000000000..9cc9dce8e3 --- /dev/null +++ b/docs/reference/type-aliases/ExternalAtoms.md @@ -0,0 +1,22 @@ +--- +id: ExternalAtoms +title: ExternalAtoms +--- + +# Type Alias: ExternalAtoms\ + +```ts +type ExternalAtoms = Partial<{ [K in keyof TableState]: Atom[K]> }>; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:39](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L39) + +A map of optional external atoms, one per `TableState` slice. Consumers can +provide their own writable atom for any state slice to take over ownership +of that slice. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* [`TableFeatures`](../interfaces/TableFeatures.md) diff --git a/docs/reference/type-aliases/ExternalAtoms_All.md b/docs/reference/type-aliases/ExternalAtoms_All.md new file mode 100644 index 0000000000..d1f9c42af5 --- /dev/null +++ b/docs/reference/type-aliases/ExternalAtoms_All.md @@ -0,0 +1,12 @@ +--- +id: ExternalAtoms_All +title: ExternalAtoms_All +--- + +# Type Alias: ExternalAtoms\_All + +```ts +type ExternalAtoms_All = Partial<{ [K in keyof TableState_All]: Atom }>; +``` + +Defined in: [core/table/coreTablesFeature.types.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/core/table/coreTablesFeature.types.ts#L58) diff --git a/docs/reference/type-aliases/MemoFnMeta.md b/docs/reference/type-aliases/MemoFnMeta.md index 8bd1a0b73b..2c217262a8 100644 --- a/docs/reference/type-aliases/MemoFnMeta.md +++ b/docs/reference/type-aliases/MemoFnMeta.md @@ -9,7 +9,7 @@ title: MemoFnMeta type MemoFnMeta = object; ``` -Defined in: [utils.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L62) +Defined in: [utils.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L57) ## Properties @@ -19,4 +19,4 @@ Defined in: [utils.ts:62](https://github.com/TanStack/table/blob/main/packages/t optional originalArgsLength: number; ``` -Defined in: [utils.ts:62](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L62) +Defined in: [utils.ts:57](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L57) diff --git a/docs/reference/type-aliases/PrototypeAPIObject.md b/docs/reference/type-aliases/PrototypeAPIObject.md index a49ea8560c..408fd8e1c1 100644 --- a/docs/reference/type-aliases/PrototypeAPIObject.md +++ b/docs/reference/type-aliases/PrototypeAPIObject.md @@ -9,7 +9,7 @@ title: PrototypeAPIObject type PrototypeAPIObject = Record>; ``` -Defined in: [utils.ts:327](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L327) +Defined in: [utils.ts:322](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L322) ## Type Parameters diff --git a/docs/reference/type-aliases/RowSelectionState.md b/docs/reference/type-aliases/RowSelectionState.md index 6c89907474..f5f454a788 100644 --- a/docs/reference/type-aliases/RowSelectionState.md +++ b/docs/reference/type-aliases/RowSelectionState.md @@ -6,7 +6,7 @@ title: RowSelectionState # Type Alias: RowSelectionState ```ts -type RowSelectionState = Record; +type RowSelectionState = Record; ``` Defined in: [features/row-selection/rowSelectionFeature.types.ts:6](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts#L6) diff --git a/docs/reference/type-aliases/Table.md b/docs/reference/type-aliases/Table.md index a35164e648..26cf483e5e 100644 --- a/docs/reference/type-aliases/Table.md +++ b/docs/reference/type-aliases/Table.md @@ -23,7 +23,7 @@ type Table = Table_Core & UnionToIntersectio | "rowSortingFeature" extends keyof TFeatures ? Table_RowSorting : never> & ExtractFeatureTypes<"Table", TFeatures> & Table_Plugins; ``` -Defined in: [types/Table.ts:53](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L53) +Defined in: [types/Table.ts:58](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L58) The table object that includes both the core table functionality and the features that are enabled via the `_features` table option. diff --git a/docs/reference/type-aliases/Table_Core.md b/docs/reference/type-aliases/Table_Core.md index 905d32b0ae..d427a93c7d 100644 --- a/docs/reference/type-aliases/Table_Core.md +++ b/docs/reference/type-aliases/Table_Core.md @@ -9,7 +9,7 @@ title: Table_Core type Table_Core = Table_Table & Table_Columns & Table_Rows & Table_RowModels & Table_Headers; ``` -Defined in: [types/Table.ts:41](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L41) +Defined in: [types/Table.ts:46](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L46) The core table object that only includes the core table functionality such as column, header, row, and table APIS. No features are included. diff --git a/docs/reference/type-aliases/Table_Internal.md b/docs/reference/type-aliases/Table_Internal.md index 36aa9f7d31..61d11492f0 100644 --- a/docs/reference/type-aliases/Table_Internal.md +++ b/docs/reference/type-aliases/Table_Internal.md @@ -9,7 +9,7 @@ title: Table_Internal type Table_Internal = Table & object; ``` -Defined in: [types/Table.ts:111](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L111) +Defined in: [types/Table.ts:116](https://github.com/TanStack/table/blob/main/packages/table-core/src/types/Table.ts#L116) ## Type Declaration @@ -25,10 +25,16 @@ _rowModelFns: RowModelFns_All; _rowModels: CachedRowModel_All; ``` -### baseStore +### atoms ```ts -baseStore: Store; +atoms: Atoms_All; +``` + +### baseAtoms + +```ts +baseAtoms: BaseAtoms_All; ``` ### initialState @@ -51,6 +57,12 @@ options: TableOptions_All & object; optional _rowModels: CreateRowModels_All; ``` +##### atoms? + +```ts +optional atoms: ExternalAtoms_All; +``` + ##### initialState? ```ts diff --git a/docs/reference/variables/$internalMemoFnMeta.md b/docs/reference/variables/$internalMemoFnMeta.md index c83d60f5ed..fc9fbc222d 100644 --- a/docs/reference/variables/$internalMemoFnMeta.md +++ b/docs/reference/variables/$internalMemoFnMeta.md @@ -9,4 +9,4 @@ title: $internalMemoFnMeta const $internalMemoFnMeta: typeof $internalMemoFnMeta; ``` -Defined in: [utils.ts:61](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L61) +Defined in: [utils.ts:56](https://github.com/TanStack/table/blob/main/packages/table-core/src/utils.ts#L56) diff --git a/examples/angular/basic-inject-table/src/app/app.ts b/examples/angular/basic-inject-table/src/app/app.ts index e85d051a9d..ca81e966c9 100644 --- a/examples/angular/basic-inject-table/src/app/app.ts +++ b/examples/angular/basic-inject-table/src/app/app.ts @@ -94,6 +94,7 @@ export class App { // 5. Create the table instance with required _features, columns, and data table = injectTable(() => ({ + debugTable: true, _features, // new required option in V9. Tell the table which features you are importing and using (better tree-shaking) _rowModels: {}, // `Core` row model is now included by default, but you can still override it here data: this.data(), diff --git a/examples/angular/grouping/src/app/app.ts b/examples/angular/grouping/src/app/app.ts index 26541ca371..c25692888c 100644 --- a/examples/angular/grouping/src/app/app.ts +++ b/examples/angular/grouping/src/app/app.ts @@ -25,6 +25,7 @@ export class App { ) readonly table = injectTable(() => ({ + debugTable: true, data: this.data(), columns: columns, initialState: { diff --git a/examples/angular/remote-data/src/app/app.ts b/examples/angular/remote-data/src/app/app.ts index 13b01e1456..dd15a8c0c1 100644 --- a/examples/angular/remote-data/src/app/app.ts +++ b/examples/angular/remote-data/src/app/app.ts @@ -136,6 +136,7 @@ export class App { readonly table = injectTable(() => { const data = this.dataWithLatest() return { + debugTable: true, _features, data: data.items, columns: this.columns, diff --git a/examples/angular/row-selection/src/app/app.ts b/examples/angular/row-selection/src/app/app.ts index e842d639cb..0533731bfb 100644 --- a/examples/angular/row-selection/src/app/app.ts +++ b/examples/angular/row-selection/src/app/app.ts @@ -89,6 +89,7 @@ export class App { ]) readonly table = injectTable(() => ({ + debugTable: true, data: this.data(), columns: this.columns, state: { diff --git a/examples/angular/sub-components/src/app/app.ts b/examples/angular/sub-components/src/app/app.ts index d167610a14..fbe4e6b5a4 100644 --- a/examples/angular/sub-components/src/app/app.ts +++ b/examples/angular/sub-components/src/app/app.ts @@ -102,6 +102,7 @@ export class App { readonly expanded = signal({}) readonly table = injectTable(() => ({ + debugTable: true, _features, _rowModels: { expandedRowModel: createExpandedRowModel(), diff --git a/examples/lit/basic-app-table/src/main.ts b/examples/lit/basic-app-table/src/main.ts index ce112195c2..79df2c0329 100644 --- a/examples/lit/basic-app-table/src/main.ts +++ b/examples/lit/basic-app-table/src/main.ts @@ -123,6 +123,7 @@ class LitTableExample extends LitElement { return useAppTable( this, { + debugTable: true, columns, get data() { return host.data diff --git a/examples/lit/basic-external-store/index.html b/examples/lit/basic-external-atoms/index.html similarity index 100% rename from examples/lit/basic-external-store/index.html rename to examples/lit/basic-external-atoms/index.html diff --git a/examples/lit/basic-external-store/package.json b/examples/lit/basic-external-atoms/package.json similarity index 81% rename from examples/lit/basic-external-store/package.json rename to examples/lit/basic-external-atoms/package.json index 734c8df5f6..289a18e6d2 100644 --- a/examples/lit/basic-external-store/package.json +++ b/examples/lit/basic-external-atoms/package.json @@ -1,5 +1,5 @@ { - "name": "tanstack-lit-table-example-basic-external-store", + "name": "tanstack-lit-table-example-basic-external-atoms", "version": "0.0.0", "private": true, "scripts": { @@ -12,6 +12,7 @@ "dependencies": { "@faker-js/faker": "^10.4.0", "@tanstack/lit-table": "^9.0.0-alpha.33", + "@tanstack/store": "^0.11.0", "lit": "^3.3.2" }, "devDependencies": { diff --git a/examples/lit/basic-external-store/src/main.ts b/examples/lit/basic-external-atoms/src/main.ts similarity index 79% rename from examples/lit/basic-external-store/src/main.ts rename to examples/lit/basic-external-atoms/src/main.ts index 81bdc38d5e..0abca01b0e 100644 --- a/examples/lit/basic-external-store/src/main.ts +++ b/examples/lit/basic-external-atoms/src/main.ts @@ -1,4 +1,4 @@ -import { customElement, state } from 'lit/decorators.js' +import { customElement } from 'lit/decorators.js' import { LitElement, html } from 'lit' import { repeat } from 'lit/directives/repeat.js' import { @@ -7,21 +7,20 @@ import { createColumnHelper, createPaginatedRowModel, createSortedRowModel, - getInitialTableState, rowPaginationFeature, rowSortingFeature, sortFns, tableFeatures, } from '@tanstack/lit-table' +import { createAtom } from '@tanstack/store' import { makeData } from './makeData' -import type { - PaginationState, - SortingState, - TableState, -} from '@tanstack/lit-table' +import type { PaginationState, SortingState } from '@tanstack/lit-table' import type { Person } from './makeData' -// This example demonstrates managing ALL table state in a single unified @state() object using getInitialTableState, instead of using separate @state() properties per state slice. +// This example demonstrates managing individual slices of table state via +// external TanStack Store atoms. Each atom is a stand-alone, subscribable +// reactive cell — you can read, write, or subscribe to it from anywhere, +// which makes it convenient for sharing state across components or modules. const _features = tableFeatures({ rowPaginationFeature, @@ -55,22 +54,25 @@ const columns = columnHelper.columns([ const data = makeData(1000) +// Create stable external atoms for the individual state slices you want to +// own. These live at module scope here, but could just as easily be created +// in a shared store module and imported by multiple components. +const sortingAtom = createAtom([]) +const paginationAtom = createAtom({ + pageIndex: 0, + pageSize: 10, +}) + @customElement('lit-table-example') class LitTableExample extends LitElement { private tableController = new TableController(this) - // Store all table state in one unified object, initialized with defaults from features - @state() - private tableState: TableState = getInitialTableState( - _features, - { - sorting: [] as SortingState, - pagination: { pageIndex: 0, pageSize: 10 } as PaginationState, - }, - ) - protected render() { - // Create the table and pass the unified state object + // The table creates internal base atoms for every slice, and (because we + // pass `atoms` below) reads/writes for `sorting` and `pagination` are + // routed through the external atoms we created instead. The + // TableController subscribes to `table.store` for us, so any atom change + // flowing through the derived store triggers `host.requestUpdate()`. const table = this.tableController.table( { _features, @@ -80,24 +82,9 @@ class LitTableExample extends LitElement { }, columns, data, - state: this.tableState, - onSortingChange: (updater) => { - this.tableState = { - ...this.tableState, - sorting: - typeof updater === 'function' - ? updater(this.tableState.sorting) - : updater, - } - }, - onPaginationChange: (updater) => { - this.tableState = { - ...this.tableState, - pagination: - typeof updater === 'function' - ? updater(this.tableState.pagination) - : updater, - } + atoms: { + sorting: sortingAtom, + pagination: paginationAtom, }, debugTable: true, }, @@ -107,6 +94,9 @@ class LitTableExample extends LitElement { }), ) + const pagination = paginationAtom.get() + const sorting = sortingAtom.get() + return html`
@@ -191,8 +181,7 @@ class LitTableExample extends LitElement {
Page
- ${this.tableState.pagination.pageIndex + 1} of - ${table.getPageCount()} + ${pagination.pageIndex + 1} of ${table.getPageCount()}
@@ -201,7 +190,7 @@ class LitTableExample extends LitElement { type="number" min="1" max="${table.getPageCount()}" - .value="${String(this.tableState.pagination.pageIndex + 1)}" + .value="${String(pagination.pageIndex + 1)}" @input="${(e: InputEvent) => { const target = e.currentTarget as HTMLInputElement const page = target.value ? Number(target.value) - 1 : 0 @@ -211,7 +200,7 @@ class LitTableExample extends LitElement { /> { table.setPageSize(Number((e.target as HTMLInputElement).value)) }} @@ -199,7 +197,7 @@ function App() { -
{JSON.stringify(state, null, 2)}
+
{JSON.stringify({ sorting, pagination }, null, 2)}
) } diff --git a/examples/preact/basic-external-store/src/makeData.ts b/examples/preact/basic-external-atoms/src/makeData.ts similarity index 100% rename from examples/preact/basic-external-store/src/makeData.ts rename to examples/preact/basic-external-atoms/src/makeData.ts diff --git a/examples/preact/basic-external-store/src/vite-env.d.ts b/examples/preact/basic-external-atoms/src/vite-env.d.ts similarity index 100% rename from examples/preact/basic-external-store/src/vite-env.d.ts rename to examples/preact/basic-external-atoms/src/vite-env.d.ts diff --git a/examples/preact/basic-external-store/tsconfig.json b/examples/preact/basic-external-atoms/tsconfig.json similarity index 100% rename from examples/preact/basic-external-store/tsconfig.json rename to examples/preact/basic-external-atoms/tsconfig.json diff --git a/examples/preact/basic-external-store/vite.config.ts b/examples/preact/basic-external-atoms/vite.config.ts similarity index 100% rename from examples/preact/basic-external-store/vite.config.ts rename to examples/preact/basic-external-atoms/vite.config.ts diff --git a/examples/preact/basic-external-state/package.json b/examples/preact/basic-external-state/package.json index 3b6e17a79b..0d09f1b98e 100644 --- a/examples/preact/basic-external-state/package.json +++ b/examples/preact/basic-external-state/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-basic-external-state", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/basic-external-state/src/main.tsx b/examples/preact/basic-external-state/src/main.tsx index 3a7863f772..8663b19ce3 100644 --- a/examples/preact/basic-external-state/src/main.tsx +++ b/examples/preact/basic-external-state/src/main.tsx @@ -72,6 +72,7 @@ function App() { // Create the table and pass state + onChange handlers const table = useTable({ + debugTable: true, _features, _rowModels: { sortedRowModel: createSortedRowModel(sortFns), diff --git a/examples/preact/basic-use-app-table/package.json b/examples/preact/basic-use-app-table/package.json index cf441582e7..c3a2935831 100644 --- a/examples/preact/basic-use-app-table/package.json +++ b/examples/preact/basic-use-app-table/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-basic-use-app-table", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/basic-use-app-table/src/main.tsx b/examples/preact/basic-use-app-table/src/main.tsx index 9c2be98355..55c5dea994 100644 --- a/examples/preact/basic-use-app-table/src/main.tsx +++ b/examples/preact/basic-use-app-table/src/main.tsx @@ -104,6 +104,7 @@ function App() { // 7. Create the table instance with the required columns and data. // Features and row models are already defined in the createTableHook call above const table = useAppTable({ + debugTable: true, columns, data, // add additional table options here or in the createTableHook call above diff --git a/examples/preact/basic/.gitignore b/examples/preact/basic-use-table/.gitignore similarity index 100% rename from examples/preact/basic/.gitignore rename to examples/preact/basic-use-table/.gitignore diff --git a/examples/preact/basic/README.md b/examples/preact/basic-use-table/README.md similarity index 100% rename from examples/preact/basic/README.md rename to examples/preact/basic-use-table/README.md diff --git a/examples/preact/basic/index.html b/examples/preact/basic-use-table/index.html similarity index 100% rename from examples/preact/basic/index.html rename to examples/preact/basic-use-table/index.html diff --git a/examples/preact/basic/package.json b/examples/preact/basic-use-table/package.json similarity index 95% rename from examples/preact/basic/package.json rename to examples/preact/basic-use-table/package.json index c9f3c3c99d..2c16b7896f 100644 --- a/examples/preact/basic/package.json +++ b/examples/preact/basic-use-table/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-basic", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/basic/public/vite.svg b/examples/preact/basic-use-table/public/vite.svg similarity index 100% rename from examples/preact/basic/public/vite.svg rename to examples/preact/basic-use-table/public/vite.svg diff --git a/examples/preact/basic/src/index.css b/examples/preact/basic-use-table/src/index.css similarity index 100% rename from examples/preact/basic/src/index.css rename to examples/preact/basic-use-table/src/index.css diff --git a/examples/preact/basic/src/main.tsx b/examples/preact/basic-use-table/src/main.tsx similarity index 99% rename from examples/preact/basic/src/main.tsx rename to examples/preact/basic-use-table/src/main.tsx index a05f4217f8..c2a08edb7a 100644 --- a/examples/preact/basic/src/main.tsx +++ b/examples/preact/basic-use-table/src/main.tsx @@ -97,6 +97,7 @@ function App() { // 6. Create the table instance with required _features, columns, and data const table = useTable({ + debugTable: true, _features, // new required option in V9. Tell the table which features you are importing and using (better tree-shaking) _rowModels: {}, // `Core` row model is now included by default, but you can still override it here columns, diff --git a/examples/preact/basic/src/vite-env.d.ts b/examples/preact/basic-use-table/src/vite-env.d.ts similarity index 100% rename from examples/preact/basic/src/vite-env.d.ts rename to examples/preact/basic-use-table/src/vite-env.d.ts diff --git a/examples/preact/basic/tsconfig.json b/examples/preact/basic-use-table/tsconfig.json similarity index 100% rename from examples/preact/basic/tsconfig.json rename to examples/preact/basic-use-table/tsconfig.json diff --git a/examples/preact/basic/vite.config.ts b/examples/preact/basic-use-table/vite.config.ts similarity index 100% rename from examples/preact/basic/vite.config.ts rename to examples/preact/basic-use-table/vite.config.ts diff --git a/examples/preact/column-groups/package.json b/examples/preact/column-groups/package.json index e6e43959b7..7243ebe2ad 100644 --- a/examples/preact/column-groups/package.json +++ b/examples/preact/column-groups/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-column-groups", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/column-groups/src/main.tsx b/examples/preact/column-groups/src/main.tsx index a019b66e84..088abcf1b7 100644 --- a/examples/preact/column-groups/src/main.tsx +++ b/examples/preact/column-groups/src/main.tsx @@ -99,6 +99,7 @@ function App() { const rerender = useReducer(() => ({}), {})[1] const table = useTable({ + debugTable: true, _features, _rowModels: {}, columns, diff --git a/examples/preact/column-ordering/package.json b/examples/preact/column-ordering/package.json index 17c1086ad0..6143e4d699 100644 --- a/examples/preact/column-ordering/package.json +++ b/examples/preact/column-ordering/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-column-ordering", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/column-pinning-split/package.json b/examples/preact/column-pinning-split/package.json index b621e7998f..33e2980299 100644 --- a/examples/preact/column-pinning-split/package.json +++ b/examples/preact/column-pinning-split/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-column-pinning-split", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/column-pinning-sticky/package.json b/examples/preact/column-pinning-sticky/package.json index 2c7ca6f478..3314ffedfb 100644 --- a/examples/preact/column-pinning-sticky/package.json +++ b/examples/preact/column-pinning-sticky/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-column-pinning-sticky", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/column-pinning/package.json b/examples/preact/column-pinning/package.json index 5cf2047fb4..0f1b71d92c 100644 --- a/examples/preact/column-pinning/package.json +++ b/examples/preact/column-pinning/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-column-pinning", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/column-pinning/src/main.tsx b/examples/preact/column-pinning/src/main.tsx index e7f40ad743..31c05c6e02 100644 --- a/examples/preact/column-pinning/src/main.tsx +++ b/examples/preact/column-pinning/src/main.tsx @@ -80,6 +80,7 @@ function App() { const rerender = () => setData(() => makeData(5000)) const table = useAppTable({ + debugTable: true, columns, data, }) diff --git a/examples/preact/column-resizing-performant/package.json b/examples/preact/column-resizing-performant/package.json index 79ecaa1745..3ec76c1453 100644 --- a/examples/preact/column-resizing-performant/package.json +++ b/examples/preact/column-resizing-performant/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-column-resizing-performant", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/column-resizing/package.json b/examples/preact/column-resizing/package.json index 081e298eda..1914d21794 100644 --- a/examples/preact/column-resizing/package.json +++ b/examples/preact/column-resizing/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-column-resizing", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/column-sizing/package.json b/examples/preact/column-sizing/package.json index 6ff1125631..0adbbd244f 100644 --- a/examples/preact/column-sizing/package.json +++ b/examples/preact/column-sizing/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-column-sizing", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/column-visibility/package.json b/examples/preact/column-visibility/package.json index 504348ad34..b1b789a242 100644 --- a/examples/preact/column-visibility/package.json +++ b/examples/preact/column-visibility/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-column-visibility", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/composable-tables/package.json b/examples/preact/composable-tables/package.json index 098fee5974..249343e8c9 100644 --- a/examples/preact/composable-tables/package.json +++ b/examples/preact/composable-tables/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-composable-tables", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/composable-tables/src/main.tsx b/examples/preact/composable-tables/src/main.tsx index 06e53ca38c..a0bfd8516d 100644 --- a/examples/preact/composable-tables/src/main.tsx +++ b/examples/preact/composable-tables/src/main.tsx @@ -253,6 +253,7 @@ function ProductsTable() { // Create the table using the same useAppTable hook const table = useAppTable({ + debugTable: true, columns, data, getRowId: (row) => row.id, diff --git a/examples/preact/custom-plugin/package.json b/examples/preact/custom-plugin/package.json index 9e1262937a..251c26694c 100644 --- a/examples/preact/custom-plugin/package.json +++ b/examples/preact/custom-plugin/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-custom-plugin", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/expanding/package.json b/examples/preact/expanding/package.json index 73452dc2bf..a1fbb50fc4 100644 --- a/examples/preact/expanding/package.json +++ b/examples/preact/expanding/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-expanding", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/filters-faceted/package.json b/examples/preact/filters-faceted/package.json index dc582609fe..3524865cf5 100644 --- a/examples/preact/filters-faceted/package.json +++ b/examples/preact/filters-faceted/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-filters-faceted", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/filters-fuzzy/package.json b/examples/preact/filters-fuzzy/package.json index 2a158cae34..b5ad6550ed 100644 --- a/examples/preact/filters-fuzzy/package.json +++ b/examples/preact/filters-fuzzy/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-filters-fuzzy", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/filters/package.json b/examples/preact/filters/package.json index e821f97de6..7fc695b114 100644 --- a/examples/preact/filters/package.json +++ b/examples/preact/filters/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-filters", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/grouping/package.json b/examples/preact/grouping/package.json index b0021ebd4b..a1772a5ce0 100644 --- a/examples/preact/grouping/package.json +++ b/examples/preact/grouping/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-grouping", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/pagination/package.json b/examples/preact/pagination/package.json index d3c2e87af3..67ca7b2483 100644 --- a/examples/preact/pagination/package.json +++ b/examples/preact/pagination/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-pagination", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/row-pinning/package.json b/examples/preact/row-pinning/package.json index 55dc27fcd2..06f6310cdb 100644 --- a/examples/preact/row-pinning/package.json +++ b/examples/preact/row-pinning/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-row-pinning", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/row-pinning/src/main.tsx b/examples/preact/row-pinning/src/main.tsx index e91cc14815..26edb0c646 100644 --- a/examples/preact/row-pinning/src/main.tsx +++ b/examples/preact/row-pinning/src/main.tsx @@ -149,6 +149,7 @@ function App() { const table = useTable( { + debugTable: true, _features, _rowModels: { filteredRowModel: createFilteredRowModel(filterFns), diff --git a/examples/preact/row-selection/package.json b/examples/preact/row-selection/package.json index b377885693..2eed453bb6 100644 --- a/examples/preact/row-selection/package.json +++ b/examples/preact/row-selection/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-row-selection", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/sorting/package.json b/examples/preact/sorting/package.json index d33f7a435e..9ee29e67d5 100644 --- a/examples/preact/sorting/package.json +++ b/examples/preact/sorting/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-sorting", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/sub-components/package.json b/examples/preact/sub-components/package.json index c4cadbbd3b..8cfd37b737 100644 --- a/examples/preact/sub-components/package.json +++ b/examples/preact/sub-components/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-sub-components", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/sub-components/src/main.tsx b/examples/preact/sub-components/src/main.tsx index 41f720cec6..b8691bb475 100644 --- a/examples/preact/sub-components/src/main.tsx +++ b/examples/preact/sub-components/src/main.tsx @@ -92,6 +92,7 @@ function Table({ renderSubComponent, }: TableProps): JSX.Element { const table = useTable({ + debugTable: true, _features, _rowModels: { expandedRowModel: createExpandedRowModel(), diff --git a/examples/preact/with-tanstack-query/package.json b/examples/preact/with-tanstack-query/package.json index 762a861dfb..7592adb560 100644 --- a/examples/preact/with-tanstack-query/package.json +++ b/examples/preact/with-tanstack-query/package.json @@ -2,6 +2,7 @@ "name": "tanstack-table-example-preact-with-tanstack-query", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/preact/with-tanstack-query/src/main.tsx b/examples/preact/with-tanstack-query/src/main.tsx index 5316f56a72..ca115eefdf 100644 --- a/examples/preact/with-tanstack-query/src/main.tsx +++ b/examples/preact/with-tanstack-query/src/main.tsx @@ -6,16 +6,16 @@ import { keepPreviousData, useQuery, } from '@tanstack/preact-query' -import { useCreateStore, useSelector } from '@tanstack/preact-store' +import { useCreateAtom, useSelector } from '@tanstack/preact-store' import './index.css' import { createColumnHelper, - getInitialTableState, rowPaginationFeature, tableFeatures, useTable, } from '@tanstack/preact-table' import { fetchData } from './fetchData' +import type { PaginationState } from '@tanstack/preact-table' import type { Person } from './fetchData' const queryClient = new QueryClient() @@ -52,18 +52,18 @@ const columns = columnHelper.columns([ function App() { const rerender = useReducer(() => ({}), {})[1] - const myTableStore = useCreateStore( - getInitialTableState(_features, { - pagination: { pageIndex: 0, pageSize: 10 }, - }), - ) + // Create a stable external atom for the pagination slice. + const paginationAtom = useCreateAtom({ + pageIndex: 0, + pageSize: 10, + }) - // Subscribe to store state for reactive updates - const state = useSelector(myTableStore, (state) => state) + // Subscribe to the atom for reactive updates. + const pagination = useSelector(paginationAtom, (s) => s) const dataQuery = useQuery({ - queryKey: ['data', state.pagination], - queryFn: () => fetchData(state.pagination), + queryKey: ['data', pagination], + queryFn: () => fetchData(pagination), placeholderData: keepPreviousData, // don't have 0 rows flash while changing pages/loading next page }) @@ -75,7 +75,9 @@ function App() { columns, data: dataQuery.data?.rows ?? defaultData, rowCount: dataQuery.data?.rowCount, - store: myTableStore, + atoms: { + pagination: paginationAtom, + }, manualPagination: true, // we're doing manual "server-side" pagination debugTable: true, }) @@ -142,7 +144,7 @@ function App() {
Page
- {state.pagination.pageIndex + 1} of{' '} + {pagination.pageIndex + 1} of{' '} {table.getPageCount().toLocaleString()}
@@ -152,7 +154,7 @@ function App() { type="number" min="1" max={table.getPageCount()} - defaultValue={state.pagination.pageIndex + 1} + defaultValue={pagination.pageIndex + 1} onChange={(e) => { const page = (e.target as HTMLInputElement).value ? Number((e.target as HTMLInputElement).value) - 1 @@ -163,7 +165,7 @@ function App() { /> { table.setPageSize(Number(e.target.value)) }} @@ -197,7 +198,7 @@ function App() { -
{JSON.stringify(state, null, 2)}
+
{JSON.stringify({ sorting, pagination }, null, 2)}
) } diff --git a/examples/react/basic-external-store/src/makeData.ts b/examples/react/basic-external-atoms/src/makeData.ts similarity index 100% rename from examples/react/basic-external-store/src/makeData.ts rename to examples/react/basic-external-atoms/src/makeData.ts diff --git a/examples/react/basic-external-store/src/vite-env.d.ts b/examples/react/basic-external-atoms/src/vite-env.d.ts similarity index 100% rename from examples/react/basic-external-store/src/vite-env.d.ts rename to examples/react/basic-external-atoms/src/vite-env.d.ts diff --git a/examples/react/basic-external-store/tsconfig.json b/examples/react/basic-external-atoms/tsconfig.json similarity index 100% rename from examples/react/basic-external-store/tsconfig.json rename to examples/react/basic-external-atoms/tsconfig.json diff --git a/examples/react/basic-external-store/vite.config.js b/examples/react/basic-external-atoms/vite.config.js similarity index 100% rename from examples/react/basic-external-store/vite.config.js rename to examples/react/basic-external-atoms/vite.config.js diff --git a/examples/react/basic-external-state/src/main.tsx b/examples/react/basic-external-state/src/main.tsx index cd965b0ff9..66dd9c9b13 100644 --- a/examples/react/basic-external-state/src/main.tsx +++ b/examples/react/basic-external-state/src/main.tsx @@ -72,6 +72,7 @@ function App() { // Create the table and pass state + onChange handlers const table = useTable({ + debugTable: true, _features, _rowModels: { sortedRowModel: createSortedRowModel(sortFns), diff --git a/examples/react/basic-shadcn/src/main.tsx b/examples/react/basic-shadcn/src/main.tsx index 4af54d7f2a..40a1168188 100644 --- a/examples/react/basic-shadcn/src/main.tsx +++ b/examples/react/basic-shadcn/src/main.tsx @@ -105,6 +105,7 @@ function App() { // 6. Create the table instance with required _features, columns, and data const table = useTable({ + debugTable: true, _features, // new required option in V9. Tell the table which features you are importing and using (better tree-shaking) _rowModels: {}, // `Core` row model is now included by default, but you can still override it here columns, diff --git a/examples/react/basic-use-app-table/src/main.tsx b/examples/react/basic-use-app-table/src/main.tsx index bc5dad4df6..e32fa2a8a2 100644 --- a/examples/react/basic-use-app-table/src/main.tsx +++ b/examples/react/basic-use-app-table/src/main.tsx @@ -104,6 +104,7 @@ function App() { // 7. Create the table instance with the required columns and data. // Features and row models are already defined in the createTableHook call above const table = useAppTable({ + debugTable: true, columns, data, // add additional table options here or in the createTableHook call above diff --git a/examples/react/basic-use-table/src/main.tsx b/examples/react/basic-use-table/src/main.tsx index 401a67bff6..7da5eb7d0e 100644 --- a/examples/react/basic-use-table/src/main.tsx +++ b/examples/react/basic-use-table/src/main.tsx @@ -97,6 +97,7 @@ function App() { // 6. Create the table instance with required _features, columns, and data const table = useTable({ + debugTable: true, _features, // new required option in V9. Tell the table which features you are importing and using (better tree-shaking) _rowModels: {}, // `Core` row model is now included by default, but you can still override it here columns, diff --git a/examples/react/column-dnd/src/main.tsx b/examples/react/column-dnd/src/main.tsx index dbc0c904d0..b91feee4c8 100644 --- a/examples/react/column-dnd/src/main.tsx +++ b/examples/react/column-dnd/src/main.tsx @@ -138,6 +138,7 @@ function App() { const table = useAppTable( { + debugTable: true, columns, data, initialState: { diff --git a/examples/react/column-groups/src/main.tsx b/examples/react/column-groups/src/main.tsx index 3863eede3a..ca45c2057a 100644 --- a/examples/react/column-groups/src/main.tsx +++ b/examples/react/column-groups/src/main.tsx @@ -99,6 +99,7 @@ function App() { const rerender = React.useReducer(() => ({}), {})[1] const table = useTable({ + debugTable: true, _features, _rowModels: {}, columns, diff --git a/examples/react/column-pinning/src/main.tsx b/examples/react/column-pinning/src/main.tsx index bf2a5d7626..a8046e1fd6 100644 --- a/examples/react/column-pinning/src/main.tsx +++ b/examples/react/column-pinning/src/main.tsx @@ -80,6 +80,7 @@ function App() { const rerender = () => setData(() => makeData(5000)) const table = useAppTable({ + debugTable: true, columns, data, }) diff --git a/examples/react/composable-tables/src/main.tsx b/examples/react/composable-tables/src/main.tsx index e432236130..f6cfbe77ae 100644 --- a/examples/react/composable-tables/src/main.tsx +++ b/examples/react/composable-tables/src/main.tsx @@ -254,6 +254,7 @@ function ProductsTable() { // Create the table using the same useAppTable hook const table = useAppTable({ + debugTable: true, columns, data, getRowId: (row) => row.id, diff --git a/examples/react/row-dnd/src/main.tsx b/examples/react/row-dnd/src/main.tsx index 67e2fbbead..f81fc5b17a 100644 --- a/examples/react/row-dnd/src/main.tsx +++ b/examples/react/row-dnd/src/main.tsx @@ -128,6 +128,7 @@ function App() { const table = useAppTable( { + debugTable: true, columns, data, getRowId: (row) => row.userId, // required because row indexes will change diff --git a/examples/react/row-pinning/src/main.tsx b/examples/react/row-pinning/src/main.tsx index 58862acdca..0df318bdae 100644 --- a/examples/react/row-pinning/src/main.tsx +++ b/examples/react/row-pinning/src/main.tsx @@ -149,6 +149,7 @@ function App() { const table = useTable( { + debugTable: true, _features, _rowModels: { filteredRowModel: createFilteredRowModel(filterFns), diff --git a/examples/react/row-selection/src/main.tsx b/examples/react/row-selection/src/main.tsx index f91791a9a3..c141ea444c 100644 --- a/examples/react/row-selection/src/main.tsx +++ b/examples/react/row-selection/src/main.tsx @@ -20,8 +20,9 @@ import { TanStackDevtools } from '@tanstack/react-devtools' import { makeData } from './makeData' import type { HTMLProps } from 'react' import type { Person } from './makeData' -import type { Column, Table } from '@tanstack/react-table' +import type { Column, RowSelectionState, Table } from '@tanstack/react-table' import './index.css' +import { useCreateAtom } from '@tanstack/react-store' const _features = tableFeatures({ rowPaginationFeature, @@ -98,6 +99,8 @@ function App() { const [data, setData] = React.useState(() => makeData(1_000)) const refreshData = () => setData(() => makeData(100_000)) // stress test + const rowSelectionAtom = useCreateAtom({}) + const table = useTable( { _features, @@ -105,6 +108,9 @@ function App() { filteredRowModel: createFilteredRowModel(filterFns), paginatedRowModel: createPaginatedRowModel(), }, + atoms: { + rowSelection: rowSelectionAtom, + }, columns, data, getRowId: (row) => row.id, diff --git a/examples/react/sub-components/src/main.tsx b/examples/react/sub-components/src/main.tsx index 8d70780e36..47b377dfa1 100644 --- a/examples/react/sub-components/src/main.tsx +++ b/examples/react/sub-components/src/main.tsx @@ -93,6 +93,7 @@ function Table({ renderSubComponent, }: TableProps): React.JSX.Element { const table = useTable({ + debugTable: true, _features, _rowModels: { expandedRowModel: createExpandedRowModel(), diff --git a/examples/react/with-tanstack-query/src/main.tsx b/examples/react/with-tanstack-query/src/main.tsx index d2e1b14966..7a3c69d344 100644 --- a/examples/react/with-tanstack-query/src/main.tsx +++ b/examples/react/with-tanstack-query/src/main.tsx @@ -6,16 +6,16 @@ import { keepPreviousData, useQuery, } from '@tanstack/react-query' -import { useCreateStore, useSelector } from '@tanstack/react-store' +import { useCreateAtom, useSelector } from '@tanstack/react-store' import './index.css' import { createColumnHelper, - getInitialTableState, rowPaginationFeature, tableFeatures, useTable, } from '@tanstack/react-table' import { fetchData } from './fetchData' +import type { PaginationState } from '@tanstack/react-table' import type { Person } from './fetchData' const queryClient = new QueryClient() @@ -52,18 +52,18 @@ const columns = columnHelper.columns([ function App() { const rerender = React.useReducer(() => ({}), {})[1] - const myTableStore = useCreateStore( - getInitialTableState(_features, { - pagination: { pageIndex: 0, pageSize: 10 }, - }), - ) + // Create a stable external atom for the pagination slice. + const paginationAtom = useCreateAtom({ + pageIndex: 0, + pageSize: 10, + }) - // Subscribe to store state for reactive updates - const state = useSelector(myTableStore, (state) => state) + // Subscribe to the atom for reactive updates. + const pagination = useSelector(paginationAtom, (s) => s) const dataQuery = useQuery({ - queryKey: ['data', state.pagination], - queryFn: () => fetchData(state.pagination), + queryKey: ['data', pagination], + queryFn: () => fetchData(pagination), placeholderData: keepPreviousData, // don't have 0 rows flash while changing pages/loading next page }) @@ -75,7 +75,9 @@ function App() { columns, data: dataQuery.data?.rows ?? defaultData, rowCount: dataQuery.data?.rowCount, - store: myTableStore, + atoms: { + pagination: paginationAtom, + }, manualPagination: true, // we're doing manual "server-side" pagination debugTable: true, }) @@ -142,7 +144,7 @@ function App() {
Page
- {state.pagination.pageIndex + 1} of{' '} + {pagination.pageIndex + 1} of{' '} {table.getPageCount().toLocaleString()}
@@ -152,7 +154,7 @@ function App() { type="number" min="1" max={table.getPageCount()} - defaultValue={state.pagination.pageIndex + 1} + defaultValue={pagination.pageIndex + 1} onChange={(e) => { const page = e.target.value ? Number(e.target.value) - 1 : 0 table.setPageIndex(page) @@ -161,7 +163,7 @@ function App() { /> { table.setPageSize(Number(e.currentTarget.value)) }} @@ -204,7 +196,13 @@ function App() {
-
{JSON.stringify(tableState(), null, 2)}
+
+        {JSON.stringify(
+          { sorting: sorting(), pagination: pagination() },
+          null,
+          2,
+        )}
+      
) } diff --git a/examples/solid/basic-external-store/src/index.css b/examples/solid/basic-external-atoms/src/index.css similarity index 100% rename from examples/solid/basic-external-store/src/index.css rename to examples/solid/basic-external-atoms/src/index.css diff --git a/examples/solid/basic-external-store/src/index.tsx b/examples/solid/basic-external-atoms/src/index.tsx similarity index 100% rename from examples/solid/basic-external-store/src/index.tsx rename to examples/solid/basic-external-atoms/src/index.tsx diff --git a/examples/solid/basic-external-store/src/makeData.ts b/examples/solid/basic-external-atoms/src/makeData.ts similarity index 100% rename from examples/solid/basic-external-store/src/makeData.ts rename to examples/solid/basic-external-atoms/src/makeData.ts diff --git a/examples/solid/basic-external-store/tsconfig.json b/examples/solid/basic-external-atoms/tsconfig.json similarity index 100% rename from examples/solid/basic-external-store/tsconfig.json rename to examples/solid/basic-external-atoms/tsconfig.json diff --git a/examples/solid/basic-external-store/vite.config.ts b/examples/solid/basic-external-atoms/vite.config.ts similarity index 100% rename from examples/solid/basic-external-store/vite.config.ts rename to examples/solid/basic-external-atoms/vite.config.ts diff --git a/examples/solid/basic-external-state/src/App.tsx b/examples/solid/basic-external-state/src/App.tsx index 59d619a487..b344936a93 100644 --- a/examples/solid/basic-external-state/src/App.tsx +++ b/examples/solid/basic-external-state/src/App.tsx @@ -60,6 +60,7 @@ function App() { // Create the table and pass state + onChange handlers const table = createTable({ + debugTable: true, _features, _rowModels: { sortedRowModel: createSortedRowModel(sortFns), diff --git a/examples/solid/basic-use-table/src/App.tsx b/examples/solid/basic-use-table/src/App.tsx index c00a27bdb4..9bdcee439b 100644 --- a/examples/solid/basic-use-table/src/App.tsx +++ b/examples/solid/basic-use-table/src/App.tsx @@ -93,6 +93,7 @@ function App() { // 6. Create the table instance with required _features, columns, and data const table = createTable({ + debugTable: true, _features, // new required option in V9. Tell the table which features you are importing and using (better tree-shaking) _rowModels: {}, // `Core` row model is now included by default, but you can still override it here columns, diff --git a/examples/solid/column-groups/src/App.tsx b/examples/solid/column-groups/src/App.tsx index 0ebb899768..613306c022 100644 --- a/examples/solid/column-groups/src/App.tsx +++ b/examples/solid/column-groups/src/App.tsx @@ -97,6 +97,7 @@ function App() { const rerender = () => setData(defaultData) const table = createTable({ + debugTable: true, _features, get data() { return data() diff --git a/examples/solid/column-ordering/src/App.tsx b/examples/solid/column-ordering/src/App.tsx index 9e995610e6..16540b72c4 100644 --- a/examples/solid/column-ordering/src/App.tsx +++ b/examples/solid/column-ordering/src/App.tsx @@ -73,6 +73,7 @@ function App() { const rerender = () => setData(() => makeData(20)) const table = createTable({ + debugTable: true, _features, get data() { return data() diff --git a/examples/solid/column-pinning/src/App.tsx b/examples/solid/column-pinning/src/App.tsx index 732d09e152..6402000acc 100644 --- a/examples/solid/column-pinning/src/App.tsx +++ b/examples/solid/column-pinning/src/App.tsx @@ -75,6 +75,7 @@ function App() { const rerender = () => setData(makeData(5000)) const table = createAppTable({ + debugTable: true, columns, get data() { return data() diff --git a/examples/solid/column-visibility/src/App.tsx b/examples/solid/column-visibility/src/App.tsx index 12f970d01a..6e9a434059 100644 --- a/examples/solid/column-visibility/src/App.tsx +++ b/examples/solid/column-visibility/src/App.tsx @@ -102,6 +102,7 @@ function App() { const rerender = () => setData(defaultData) const table = createTable({ + debugTable: true, _features, get data() { return data() diff --git a/examples/solid/composable-tables/src/App.tsx b/examples/solid/composable-tables/src/App.tsx index 8b220922fc..fc9285b4c3 100644 --- a/examples/solid/composable-tables/src/App.tsx +++ b/examples/solid/composable-tables/src/App.tsx @@ -260,6 +260,7 @@ function ProductsTable() { // Create the table using the same createAppTable hook const table = createAppTable({ + debugTable: true, columns, get data() { return data() diff --git a/examples/solid/row-pinning/src/App.tsx b/examples/solid/row-pinning/src/App.tsx index 7b9c93fee7..bf4b317e8b 100644 --- a/examples/solid/row-pinning/src/App.tsx +++ b/examples/solid/row-pinning/src/App.tsx @@ -122,6 +122,7 @@ function App() { const table = createTable( { + debugTable: true, _features, _rowModels: { filteredRowModel: createFilteredRowModel(filterFns), diff --git a/examples/solid/sub-components/src/App.tsx b/examples/solid/sub-components/src/App.tsx index 93adc89ec1..078fb70217 100644 --- a/examples/solid/sub-components/src/App.tsx +++ b/examples/solid/sub-components/src/App.tsx @@ -76,6 +76,7 @@ type TableProps = { function TableComponent(props: TableProps) { const table = createTable({ + debugTable: true, _features, _rowModels: { expandedRowModel: createExpandedRowModel(), diff --git a/examples/solid/virtualized-infinite-scrolling/src/App.tsx b/examples/solid/virtualized-infinite-scrolling/src/App.tsx index ffe806701f..810bf9c50c 100644 --- a/examples/solid/virtualized-infinite-scrolling/src/App.tsx +++ b/examples/solid/virtualized-infinite-scrolling/src/App.tsx @@ -4,17 +4,17 @@ import { createColumnHelper, createSortedRowModel, createTable, - getInitialTableState, rowSortingFeature, sortFns, tableFeatures, } from '@tanstack/solid-table' import { keepPreviousData, useInfiniteQuery } from '@tanstack/solid-query' -import { createStore, useSelector } from '@tanstack/solid-store' +import { createAtom, useSelector } from '@tanstack/solid-store' import { createVirtualizer } from '@tanstack/solid-virtual' import { For, Show, createMemo, onMount } from 'solid-js' import { fetchData } from './makeData' import type { Person, PersonApiResponse } from './makeData' +import type { SortingState } from '@tanstack/solid-table' import type { Virtualizer } from '@tanstack/solid-virtual' const fetchSize = 50 @@ -58,25 +58,17 @@ const columns = columnHelper.columns([ }), ]) -// Use an external store to avoid the infinite loop that occurs when createTable's -// internal createComputed cascades signal writes during async query resolution. -// This matches the pattern used in the with-tanstack-query example. -const tableStore = createStore( - getInitialTableState(_features, { - sorting: [], - }), -) - function App() { let tableContainerRef: HTMLDivElement | undefined - const state = useSelector(tableStore) + const sortingAtom = createAtom([]) + const sorting = useSelector(sortingAtom) const query = useInfiniteQuery(() => ({ - queryKey: ['people', state().sorting], + queryKey: ['people', sorting()], queryFn: async ({ pageParam = 0 }) => { const start = (pageParam as number) * fetchSize - return fetchData(start, fetchSize, state().sorting) + return fetchData(start, fetchSize, sorting()) }, initialPageParam: 0, getNextPageParam: ( @@ -123,7 +115,9 @@ function App() { return flatData() }, columns, - store: tableStore, + atoms: { + sorting: sortingAtom, + }, manualSorting: true, debugTable: true, }) diff --git a/examples/solid/with-tanstack-query/src/App.tsx b/examples/solid/with-tanstack-query/src/App.tsx index a4b74bf86a..54b5435a5c 100644 --- a/examples/solid/with-tanstack-query/src/App.tsx +++ b/examples/solid/with-tanstack-query/src/App.tsx @@ -1,15 +1,15 @@ import { keepPreviousData, useQuery } from '@tanstack/solid-query' -import { createStore, useSelector } from '@tanstack/solid-store' +import { createAtom, useSelector } from '@tanstack/solid-store' import { createColumnHelper, createTable, FlexRender, - getInitialTableState, rowPaginationFeature, tableFeatures, } from '@tanstack/solid-table' import { For } from 'solid-js' import { fetchData } from './fetchData' +import type { PaginationState } from '@tanstack/solid-table' import type { Person } from './fetchData' const _features = tableFeatures({ @@ -41,18 +41,16 @@ const columns = columnHelper.columns([ }), ]) -const myTableStore = createStore( - getInitialTableState(_features, { - pagination: { pageIndex: 0, pageSize: 10 }, - }), -) - function App() { - const state = useSelector(myTableStore) + const paginationAtom = createAtom({ + pageIndex: 0, + pageSize: 10, + }) + const pagination = useSelector(paginationAtom) const dataQuery = useQuery(() => ({ - queryKey: ['data', state().pagination], - queryFn: () => fetchData(state().pagination), + queryKey: ['data', pagination()], + queryFn: () => fetchData(pagination()), placeholderData: keepPreviousData, })) @@ -68,7 +66,9 @@ function App() { get rowCount() { return dataQuery.data?.rowCount }, - store: myTableStore, + atoms: { + pagination: paginationAtom, + }, manualPagination: true, debugTable: true, }) @@ -143,7 +143,7 @@ function App() {
Page
- {state().pagination.pageIndex + 1} of{' '} + {pagination().pageIndex + 1} of{' '} {table.getPageCount().toLocaleString()}
@@ -153,7 +153,7 @@ function App() { type="number" min="1" max={table.getPageCount()} - value={state().pagination.pageIndex + 1} + value={pagination().pageIndex + 1} onInput={(e) => { const page = e.currentTarget.value ? Number(e.currentTarget.value) - 1 @@ -164,7 +164,7 @@ function App() { />
+ + {table + .getHeaderGroups() + .map((headerGroup: HeaderGroup) => ( + + {headerGroup.headers.map( + (header: Header) => ( + + ), + )} + + ))} + + + {table + .getRowModel() + .rows.map((row: Row) => ( + + {row + .getAllCells() + .map((cell: Cell) => ( + + ))} + + ))} + +
+ {header.isPlaceholder ? null : ( +
+ + {{ + asc: ' 🔼', + desc: ' 🔽', + }[header.column.getIsSorted() as string] ?? null} +
+ )} +
+ +
+
+
+ + + + + +
Page
+ + {table.state.pagination.pageIndex + 1} of {table.getPageCount()} + +
+ + | Go to page: + { + const target = event.currentTarget as HTMLInputElement + const page = target.value ? Number(target.value) - 1 : 0 + table.setPageIndex(page) + }} + class="border p-1 rounded w-16" + /> + + +
+
+
+          {JSON.stringify(
+            {
+              sorting: table.state.sorting,
+              pagination: table.state.pagination,
+            },
+            null,
+            2,
+          )}
+        
+
+ ) + }, +}) diff --git a/examples/vue/basic-external-state/src/App.vue b/examples/vue/basic-external-state/src/App.vue new file mode 100644 index 0000000000..4256c2000a --- /dev/null +++ b/examples/vue/basic-external-state/src/App.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/vue/pagination-controlled/src/env.d.ts b/examples/vue/basic-external-state/src/env.d.ts similarity index 100% rename from examples/vue/pagination-controlled/src/env.d.ts rename to examples/vue/basic-external-state/src/env.d.ts diff --git a/examples/vue/basic-external-state/src/index.css b/examples/vue/basic-external-state/src/index.css new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/vue/basic-external-state/src/index.css @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/basic-external-state/src/main.ts b/examples/vue/basic-external-state/src/main.ts new file mode 100644 index 0000000000..50a4dab0d5 --- /dev/null +++ b/examples/vue/basic-external-state/src/main.ts @@ -0,0 +1,5 @@ +import { createApp } from 'vue' +import App from './App.vue' +import './index.css' + +createApp(App).mount('#app') diff --git a/examples/vue/basic-external-state/src/makeData.ts b/examples/vue/basic-external-state/src/makeData.ts new file mode 100644 index 0000000000..6311127267 --- /dev/null +++ b/examples/vue/basic-external-state/src/makeData.ts @@ -0,0 +1,48 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0], + } +} + +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth] + return range(len).map((): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + + return makeDataLevel() +} diff --git a/examples/vue/pagination-controlled/tsconfig.json b/examples/vue/basic-external-state/tsconfig.json similarity index 95% rename from examples/vue/pagination-controlled/tsconfig.json rename to examples/vue/basic-external-state/tsconfig.json index 0b8e08b465..84f3f40987 100644 --- a/examples/vue/pagination-controlled/tsconfig.json +++ b/examples/vue/basic-external-state/tsconfig.json @@ -13,6 +13,7 @@ "isolatedModules": true, "noEmit": true, "jsx": "preserve", + "jsxImportSource": "vue", /* Linting */ "strict": true, diff --git a/examples/vue/pagination-controlled/vite.config.ts b/examples/vue/basic-external-state/vite.config.ts similarity index 59% rename from examples/vue/pagination-controlled/vite.config.ts rename to examples/vue/basic-external-state/vite.config.ts index 05c17402a4..3dec1c870d 100644 --- a/examples/vue/pagination-controlled/vite.config.ts +++ b/examples/vue/basic-external-state/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' -// https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], + plugins: [vue(), vueJsx()], }) diff --git a/examples/vue/basic-use-app-table/package.json b/examples/vue/basic-use-app-table/package.json index 2b7006cdd5..23b145e027 100644 --- a/examples/vue/basic-use-app-table/package.json +++ b/examples/vue/basic-use-app-table/package.json @@ -16,6 +16,7 @@ "devDependencies": { "@types/node": "^25.6.0", "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "6.0.3", "vite": "^8.0.8", "vue-tsc": "^3.2.6" diff --git a/examples/vue/basic-use-app-table/src/App.vue b/examples/vue/basic-use-app-table/src/App.vue index 57728ec230..c97bbb3370 100644 --- a/examples/vue/basic-use-app-table/src/App.vue +++ b/examples/vue/basic-use-app-table/src/App.vue @@ -105,6 +105,7 @@ function rerender() { // 7. Create the table instance with the required columns and data. // Features and row models are already defined in the createTableHook call above const table = useAppTable({ + debugTable: true, columns, data, // add additional table options here or in the createTableHook call above diff --git a/examples/vue/basic-use-app-table/tsconfig.json b/examples/vue/basic-use-app-table/tsconfig.json index af40b2d681..98d8993d70 100644 --- a/examples/vue/basic-use-app-table/tsconfig.json +++ b/examples/vue/basic-use-app-table/tsconfig.json @@ -11,6 +11,7 @@ "isolatedModules": true, "noEmit": true, "jsx": "preserve", + "jsxImportSource": "vue", "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, diff --git a/examples/vue/basic-use-app-table/vite.config.ts b/examples/vue/basic-use-app-table/vite.config.ts index c40aa3c361..3dec1c870d 100644 --- a/examples/vue/basic-use-app-table/vite.config.ts +++ b/examples/vue/basic-use-app-table/vite.config.ts @@ -1,6 +1,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' export default defineConfig({ - plugins: [vue()], + plugins: [vue(), vueJsx()], }) diff --git a/examples/vue/basic/.gitignore b/examples/vue/basic-use-table/.gitignore similarity index 100% rename from examples/vue/basic/.gitignore rename to examples/vue/basic-use-table/.gitignore diff --git a/examples/vue/basic-use-table/README.md b/examples/vue/basic-use-table/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/basic-use-table/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/basic-use-table/env.d.ts b/examples/vue/basic-use-table/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/basic-use-table/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/basic-use-table/index.html b/examples/vue/basic-use-table/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/basic-use-table/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/basic/package.json b/examples/vue/basic-use-table/package.json similarity index 82% rename from examples/vue/basic/package.json rename to examples/vue/basic-use-table/package.json index c226269521..98c592bb40 100644 --- a/examples/vue/basic/package.json +++ b/examples/vue/basic-use-table/package.json @@ -1,5 +1,5 @@ { - "name": "tanstack-table-example-vue-basic", + "name": "tanstack-table-example-vue-basic-use-table", "private": true, "version": "0.0.0", "scripts": { @@ -16,6 +16,7 @@ "devDependencies": { "@types/node": "^25.6.0", "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "6.0.3", "vite": "^8.0.8", "vue-tsc": "^3.2.6" diff --git a/examples/vue/basic-use-table/src/App.tsx b/examples/vue/basic-use-table/src/App.tsx new file mode 100644 index 0000000000..f1d55e4527 --- /dev/null +++ b/examples/vue/basic-use-table/src/App.tsx @@ -0,0 +1,168 @@ +import { defineComponent, ref } from 'vue' +import { FlexRender, tableFeatures, useTable } from '@tanstack/vue-table' +import type { + Cell, + ColumnDef, + Header, + HeaderGroup, + Row, +} from '@tanstack/vue-table' + +type Person = { + firstName: string + lastName: string + age: number + visits: number + status: string + progress: number +} + +const defaultData: Array = [ + { + firstName: 'tanner', + lastName: 'linsley', + age: 24, + visits: 100, + status: 'In Relationship', + progress: 50, + }, + { + firstName: 'tandy', + lastName: 'miller', + age: 40, + visits: 40, + status: 'Single', + progress: 80, + }, + { + firstName: 'joe', + lastName: 'dirte', + age: 45, + visits: 20, + status: 'Complicated', + progress: 10, + }, + { + firstName: 'kevin', + lastName: 'vandy', + age: 12, + visits: 100, + status: 'Single', + progress: 70, + }, +] + +const _features = tableFeatures({}) + +const columns: Array> = [ + { + accessorKey: 'firstName', + header: 'First Name', + cell: (info) => info.getValue(), + }, + { + accessorFn: (row) => row.lastName, + id: 'lastName', + header: () => Last Name, + cell: (info) => {info.getValue()}, + }, + { + accessorFn: (row) => Number(row.age), + id: 'age', + header: () => 'Age', + cell: (info) => info.renderValue(), + }, + { + accessorKey: 'visits', + header: () => Visits, + }, + { + accessorKey: 'status', + header: 'Status', + }, + { + accessorKey: 'progress', + header: 'Profile Progress', + }, +] + +export default defineComponent({ + name: 'BasicUseTableExample', + setup() { + const data = ref([...defaultData]) + + const table = useTable({ + debugTable: true, + _features, + _rowModels: {}, + columns, + get data() { + return data.value + }, + }) + + const rerender = () => { + data.value = [...defaultData] + } + + return () => ( +
+ + + {table + .getHeaderGroups() + .map((headerGroup: HeaderGroup) => ( + + {headerGroup.headers.map( + (header: Header) => ( + + ), + )} + + ))} + + + {table + .getRowModel() + .rows.map((row: Row) => ( + + {row + .getAllCells() + .map((cell: Cell) => ( + + ))} + + ))} + + + {table + .getFooterGroups() + .map((footerGroup: HeaderGroup) => ( + + {footerGroup.headers.map( + (header: Header) => ( + + ), + )} + + ))} + +
+ {header.isPlaceholder ? null : ( + + )} +
+ +
+ {header.isPlaceholder ? null : ( + + )} +
+
+ +
+ ) + }, +}) diff --git a/examples/vue/basic-use-table/src/App.vue b/examples/vue/basic-use-table/src/App.vue new file mode 100644 index 0000000000..4256c2000a --- /dev/null +++ b/examples/vue/basic-use-table/src/App.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/vue/basic-use-table/src/env.d.ts b/examples/vue/basic-use-table/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/basic-use-table/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/basic-use-table/src/index.css b/examples/vue/basic-use-table/src/index.css new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/vue/basic-use-table/src/index.css @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/basic-use-table/src/main.ts b/examples/vue/basic-use-table/src/main.ts new file mode 100644 index 0000000000..50a4dab0d5 --- /dev/null +++ b/examples/vue/basic-use-table/src/main.ts @@ -0,0 +1,5 @@ +import { createApp } from 'vue' +import App from './App.vue' +import './index.css' + +createApp(App).mount('#app') diff --git a/examples/vue/basic-use-table/tsconfig.json b/examples/vue/basic-use-table/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/basic-use-table/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/basic-use-table/vite.config.ts b/examples/vue/basic-use-table/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/basic-use-table/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/basic/public/favicon.ico b/examples/vue/basic/public/favicon.ico deleted file mode 100644 index df36fcfb72584e00488330b560ebcf34a41c64c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4286 zcmds*O-Phc6o&64GDVCEQHxsW(p4>LW*W<827=Unuo8sGpRux(DN@jWP-e29Wl%wj zY84_aq9}^Am9-cWTD5GGEo#+5Fi2wX_P*bo+xO!)p*7B;iKlbFd(U~_d(U?#hLj56 zPhFkj-|A6~Qk#@g^#D^U0XT1cu=c-vu1+SElX9NR;kzAUV(q0|dl0|%h|dI$%VICy zJnu2^L*Te9JrJMGh%-P79CL0}dq92RGU6gI{v2~|)p}sG5x0U*z<8U;Ij*hB9z?ei z@g6Xq-pDoPl=MANPiR7%172VA%r)kevtV-_5H*QJKFmd;8yA$98zCxBZYXTNZ#QFk2(TX0;Y2dt&WitL#$96|gJY=3xX zpCoi|YNzgO3R`f@IiEeSmKrPSf#h#Qd<$%Ej^RIeeYfsxhPMOG`S`Pz8q``=511zm zAm)MX5AV^5xIWPyEu7u>qYs?pn$I4nL9J!=K=SGlKLXpE<5x+2cDTXq?brj?n6sp= zphe9;_JHf40^9~}9i08r{XM$7HB!`{Ys~TK0kx<}ZQng`UPvH*11|q7&l9?@FQz;8 zx!=3<4seY*%=OlbCbcae?5^V_}*K>Uo6ZWV8mTyE^B=DKy7-sdLYkR5Z?paTgK-zyIkKjIcpyO z{+uIt&YSa_$QnN_@t~L014dyK(fOOo+W*MIxbA6Ndgr=Y!f#Tokqv}n<7-9qfHkc3 z=>a|HWqcX8fzQCT=dqVbogRq!-S>H%yA{1w#2Pn;=e>JiEj7Hl;zdt-2f+j2%DeVD zsW0Ab)ZK@0cIW%W7z}H{&~yGhn~D;aiP4=;m-HCo`BEI+Kd6 z={Xwx{TKxD#iCLfl2vQGDitKtN>z|-AdCN|$jTFDg0m3O`WLD4_s#$S diff --git a/examples/vue/basic/src/App.vue b/examples/vue/basic/src/App.vue deleted file mode 100644 index ee43aaa070..0000000000 --- a/examples/vue/basic/src/App.vue +++ /dev/null @@ -1,184 +0,0 @@ - - - - - diff --git a/examples/vue/column-groups/README.md b/examples/vue/column-groups/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/column-groups/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/column-groups/env.d.ts b/examples/vue/column-groups/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/column-groups/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/column-groups/index.html b/examples/vue/column-groups/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/column-groups/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/column-groups/package.json b/examples/vue/column-groups/package.json new file mode 100644 index 0000000000..59551e4d5e --- /dev/null +++ b/examples/vue/column-groups/package.json @@ -0,0 +1,25 @@ +{ + "name": "tanstack-table-example-vue-column-groups", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "vue": "^3.5.32" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/column-groups/src/App.tsx b/examples/vue/column-groups/src/App.tsx new file mode 100644 index 0000000000..ed1e7c5317 --- /dev/null +++ b/examples/vue/column-groups/src/App.tsx @@ -0,0 +1,179 @@ +import { defineComponent, ref } from 'vue' +import { FlexRender, tableFeatures, useTable } from '@tanstack/vue-table' +import type { + Cell, + ColumnDef, + Header, + HeaderGroup, + Row, +} from '@tanstack/vue-table' + +type Person = { + firstName: string + lastName: string + age: number + visits: number + status: string + progress: number +} + +const defaultData: Array = [ + { + firstName: 'tanner', + lastName: 'linsley', + age: 24, + visits: 100, + status: 'In Relationship', + progress: 50, + }, + { + firstName: 'tandy', + lastName: 'miller', + age: 40, + visits: 40, + status: 'Single', + progress: 80, + }, + { + firstName: 'joe', + lastName: 'dirte', + age: 45, + visits: 20, + status: 'Complicated', + progress: 10, + }, +] + +const _features = tableFeatures({}) + +const columns: Array> = [ + { + header: 'Name', + footer: (props) => props.column.id, + columns: [ + { + accessorKey: 'firstName', + cell: (info) => info.getValue(), + footer: (props) => props.column.id, + }, + { + accessorFn: (row) => row.lastName, + id: 'lastName', + cell: (info) => info.getValue(), + header: () => Last Name, + footer: (props) => props.column.id, + }, + ], + }, + { + header: 'Info', + footer: (props) => props.column.id, + columns: [ + { + accessorKey: 'age', + header: () => 'Age', + footer: (props) => props.column.id, + }, + { + header: 'More Info', + columns: [ + { + accessorKey: 'visits', + header: () => Visits, + footer: (props) => props.column.id, + }, + { + accessorKey: 'status', + header: 'Status', + footer: (props) => props.column.id, + }, + { + accessorKey: 'progress', + header: 'Profile Progress', + footer: (props) => props.column.id, + }, + ], + }, + ], + }, +] + +export default defineComponent({ + name: 'ColumnGroupsExample', + setup() { + const data = ref(defaultData) + + const table = useTable({ + debugTable: true, + _features, + columns, + get data() { + return data.value + }, + }) + + const rerender = () => { + data.value = defaultData + } + + return () => ( +
+ + + {table + .getHeaderGroups() + .map((headerGroup: HeaderGroup) => ( + + {headerGroup.headers.map( + (header: Header) => ( + + ), + )} + + ))} + + + {table + .getRowModel() + .rows.map((row: Row) => ( + + {row + .getAllCells() + .map((cell: Cell) => ( + + ))} + + ))} + + + {table + .getFooterGroups() + .map((footerGroup: HeaderGroup) => ( + + {footerGroup.headers.map( + (header: Header) => ( + + ), + )} + + ))} + +
+ {header.isPlaceholder ? null : ( + + )} +
+ +
+ {header.isPlaceholder ? null : ( + + )} +
+
+ +
+ ) + }, +}) diff --git a/examples/vue/column-groups/src/App.vue b/examples/vue/column-groups/src/App.vue new file mode 100644 index 0000000000..4256c2000a --- /dev/null +++ b/examples/vue/column-groups/src/App.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/vue/column-groups/src/env.d.ts b/examples/vue/column-groups/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/column-groups/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/column-groups/src/index.css b/examples/vue/column-groups/src/index.css new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/vue/column-groups/src/index.css @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/column-groups/src/main.ts b/examples/vue/column-groups/src/main.ts new file mode 100644 index 0000000000..50a4dab0d5 --- /dev/null +++ b/examples/vue/column-groups/src/main.ts @@ -0,0 +1,5 @@ +import { createApp } from 'vue' +import App from './App.vue' +import './index.css' + +createApp(App).mount('#app') diff --git a/examples/vue/column-groups/tsconfig.json b/examples/vue/column-groups/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/column-groups/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/column-groups/vite.config.ts b/examples/vue/column-groups/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/column-groups/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/column-ordering/package.json b/examples/vue/column-ordering/package.json index 692df96ed9..58db83c730 100644 --- a/examples/vue/column-ordering/package.json +++ b/examples/vue/column-ordering/package.json @@ -1,11 +1,13 @@ { "name": "tanstack-table-example-vue-column-ordering", + "private": true, "version": "0.0.0", "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview", - "lint": "eslint ./src" + "lint": "eslint ./src", + "test:types": "vue-tsc" }, "dependencies": { "@faker-js/faker": "^10.4.0", @@ -15,6 +17,7 @@ "devDependencies": { "@types/node": "^25.6.0", "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "6.0.3", "vite": "^8.0.8", "vue-tsc": "^3.2.6" diff --git a/examples/vue/column-ordering/src/App.vue b/examples/vue/column-ordering/src/App.vue index f827e12f00..3c9df730f2 100644 --- a/examples/vue/column-ordering/src/App.vue +++ b/examples/vue/column-ordering/src/App.vue @@ -91,11 +91,15 @@ const table = useTable( const randomizeColumns = () => { table.setColumnOrder( - faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)), + faker.helpers.shuffle( + table + .getAllLeafColumns() + .map((column: Column) => column.id), + ), ) } -function toggleColumnVisibility(column: Column) { +function toggleColumnVisibility(column: Column) { table.setColumnVisibility({ ...table.state.columnVisibility, [column.id]: !column.getIsVisible(), @@ -103,9 +107,11 @@ function toggleColumnVisibility(column: Column) { } function toggleAllColumnsVisibility() { - table.getAllLeafColumns().forEach((column) => { - toggleColumnVisibility(column) - }) + table + .getAllLeafColumns() + .forEach((column: Column) => { + toggleColumnVisibility(column) + }) } diff --git a/examples/vue/column-ordering/src/index.css b/examples/vue/column-ordering/src/index.css new file mode 100644 index 0000000000..93034cdd1b --- /dev/null +++ b/examples/vue/column-ordering/src/index.css @@ -0,0 +1,35 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +td { + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +td:last-child { + border-right: 0; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/column-ordering/src/makeData.ts b/examples/vue/column-ordering/src/makeData.ts index 6311127267..b9055b2d8c 100644 --- a/examples/vue/column-ordering/src/makeData.ts +++ b/examples/vue/column-ordering/src/makeData.ts @@ -36,7 +36,7 @@ const newPerson = (): Person => { export function makeData(...lens: Array) { const makeDataLevel = (depth = 0): Array => { const len = lens[depth] - return range(len).map((): Person => { + return range(len).map((_d): Person => { return { ...newPerson(), subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, diff --git a/examples/vue/column-ordering/tsconfig.json b/examples/vue/column-ordering/tsconfig.json index 0b8e08b465..84f3f40987 100644 --- a/examples/vue/column-ordering/tsconfig.json +++ b/examples/vue/column-ordering/tsconfig.json @@ -13,6 +13,7 @@ "isolatedModules": true, "noEmit": true, "jsx": "preserve", + "jsxImportSource": "vue", /* Linting */ "strict": true, diff --git a/examples/vue/column-ordering/vite.config.ts b/examples/vue/column-ordering/vite.config.ts index 05c17402a4..3dec1c870d 100644 --- a/examples/vue/column-ordering/vite.config.ts +++ b/examples/vue/column-ordering/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' -// https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], + plugins: [vue(), vueJsx()], }) diff --git a/examples/vue/column-pinning-split/README.md b/examples/vue/column-pinning-split/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/column-pinning-split/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/column-pinning-split/env.d.ts b/examples/vue/column-pinning-split/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/column-pinning-split/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/column-pinning-split/index.html b/examples/vue/column-pinning-split/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/column-pinning-split/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/column-pinning-split/package.json b/examples/vue/column-pinning-split/package.json new file mode 100644 index 0000000000..09484bfab5 --- /dev/null +++ b/examples/vue/column-pinning-split/package.json @@ -0,0 +1,25 @@ +{ + "name": "tanstack-table-example-vue-column-pinning-split", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "vue": "^3.5.32" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/pagination-controlled/src/App.vue b/examples/vue/column-pinning-split/src/App.vue similarity index 52% rename from examples/vue/pagination-controlled/src/App.vue rename to examples/vue/column-pinning-split/src/App.vue index e4b78f0611..3d6c07bb16 100644 --- a/examples/vue/pagination-controlled/src/App.vue +++ b/examples/vue/column-pinning-split/src/App.vue @@ -1,94 +1,94 @@ + + +
+ + + diff --git a/examples/vue/column-pinning-sticky/package.json b/examples/vue/column-pinning-sticky/package.json new file mode 100644 index 0000000000..6b21ffa432 --- /dev/null +++ b/examples/vue/column-pinning-sticky/package.json @@ -0,0 +1,25 @@ +{ + "name": "tanstack-table-example-vue-column-pinning-sticky", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "vue": "^3.5.32" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/column-pinning-sticky/src/App.vue b/examples/vue/column-pinning-sticky/src/App.vue new file mode 100644 index 0000000000..3d6c07bb16 --- /dev/null +++ b/examples/vue/column-pinning-sticky/src/App.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/examples/vue/column-pinning-sticky/src/env.d.ts b/examples/vue/column-pinning-sticky/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/column-pinning-sticky/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/column-pinning-sticky/src/index.css b/examples/vue/column-pinning-sticky/src/index.css new file mode 100644 index 0000000000..799f30d2f4 --- /dev/null +++ b/examples/vue/column-pinning-sticky/src/index.css @@ -0,0 +1,49 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +.table-container { + border: 1px solid lightgray; + overflow-x: scroll; + width: 100%; + max-width: 960px; + position: relative; +} + +table { + border-collapse: separate !important; + border-spacing: 0; +} + +th { + background-color: lightgray; + border-bottom: 1px solid lightgray; + font-weight: bold; + height: 30px; + padding: 2px 4px; + position: relative; + text-align: center; +} + +td { + background-color: white; + padding: 2px 4px; +} + +.resizer { + background: rgba(0, 0, 0, 0.5); + cursor: col-resize; + height: 100%; + position: absolute; + right: 0; + top: 0; + touch-action: none; + user-select: none; + width: 5px; +} + +.resizer.isResizing { + background: blue; + opacity: 1; +} diff --git a/examples/vue/pagination-controlled/src/main.ts b/examples/vue/column-pinning-sticky/src/main.ts similarity index 100% rename from examples/vue/pagination-controlled/src/main.ts rename to examples/vue/column-pinning-sticky/src/main.ts diff --git a/examples/vue/column-pinning-sticky/src/makeData.ts b/examples/vue/column-pinning-sticky/src/makeData.ts new file mode 100644 index 0000000000..4f96799246 --- /dev/null +++ b/examples/vue/column-pinning-sticky/src/makeData.ts @@ -0,0 +1,47 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, + } +} + +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth]! + return range(len).map((): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + return makeDataLevel() +} diff --git a/examples/vue/column-pinning-sticky/tsconfig.json b/examples/vue/column-pinning-sticky/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/column-pinning-sticky/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/column-pinning-sticky/vite.config.ts b/examples/vue/column-pinning-sticky/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/column-pinning-sticky/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/column-pinning/package.json b/examples/vue/column-pinning/package.json index 485789f465..46f7f45802 100644 --- a/examples/vue/column-pinning/package.json +++ b/examples/vue/column-pinning/package.json @@ -1,5 +1,6 @@ { "name": "tanstack-table-example-vue-column-pinning", + "private": true, "version": "0.0.0", "scripts": { "dev": "vite", @@ -16,6 +17,7 @@ "devDependencies": { "@types/node": "^25.6.0", "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "6.0.3", "vite": "^8.0.8", "vue-tsc": "^3.2.6" diff --git a/examples/vue/column-pinning/src/App.vue b/examples/vue/column-pinning/src/App.vue index db9f7f0027..2b6141c5ba 100644 --- a/examples/vue/column-pinning/src/App.vue +++ b/examples/vue/column-pinning/src/App.vue @@ -95,7 +95,11 @@ const table = useTable( const randomizeColumns = () => { table.setColumnOrder( - faker.helpers.shuffle(table.getAllLeafColumns().map((d) => d.id)), + faker.helpers.shuffle( + table + .getAllLeafColumns() + .map((column: Column) => column.id), + ), ) } @@ -107,9 +111,11 @@ function toggleColumnVisibility(column: Column) { } function toggleAllColumnsVisibility() { - table.getAllLeafColumns().forEach((column) => { - toggleColumnVisibility(column) - }) + table + .getAllLeafColumns() + .forEach((column: Column) => { + toggleColumnVisibility(column) + }) } diff --git a/examples/vue/column-pinning/src/index.css b/examples/vue/column-pinning/src/index.css new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/vue/column-pinning/src/index.css @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/column-pinning/src/makeData.ts b/examples/vue/column-pinning/src/makeData.ts index 6311127267..4f96799246 100644 --- a/examples/vue/column-pinning/src/makeData.ts +++ b/examples/vue/column-pinning/src/makeData.ts @@ -29,13 +29,13 @@ const newPerson = (): Person => { 'relationship', 'complicated', 'single', - ])[0], + ])[0]!, } } export function makeData(...lens: Array) { const makeDataLevel = (depth = 0): Array => { - const len = lens[depth] + const len = lens[depth]! return range(len).map((): Person => { return { ...newPerson(), @@ -43,6 +43,5 @@ export function makeData(...lens: Array) { } }) } - return makeDataLevel() } diff --git a/examples/vue/column-pinning/tsconfig.json b/examples/vue/column-pinning/tsconfig.json index 0b8e08b465..84f3f40987 100644 --- a/examples/vue/column-pinning/tsconfig.json +++ b/examples/vue/column-pinning/tsconfig.json @@ -13,6 +13,7 @@ "isolatedModules": true, "noEmit": true, "jsx": "preserve", + "jsxImportSource": "vue", /* Linting */ "strict": true, diff --git a/examples/vue/column-pinning/vite.config.ts b/examples/vue/column-pinning/vite.config.ts index 05c17402a4..3dec1c870d 100644 --- a/examples/vue/column-pinning/vite.config.ts +++ b/examples/vue/column-pinning/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' -// https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], + plugins: [vue(), vueJsx()], }) diff --git a/examples/vue/column-resizing-performant/README.md b/examples/vue/column-resizing-performant/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/column-resizing-performant/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/column-resizing-performant/env.d.ts b/examples/vue/column-resizing-performant/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/column-resizing-performant/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/column-resizing-performant/index.html b/examples/vue/column-resizing-performant/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/column-resizing-performant/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/column-resizing-performant/package.json b/examples/vue/column-resizing-performant/package.json new file mode 100644 index 0000000000..7af47e7831 --- /dev/null +++ b/examples/vue/column-resizing-performant/package.json @@ -0,0 +1,25 @@ +{ + "name": "tanstack-table-example-vue-column-resizing-performant", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "vue": "^3.5.32" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/column-resizing-performant/src/App.vue b/examples/vue/column-resizing-performant/src/App.vue new file mode 100644 index 0000000000..3d6c07bb16 --- /dev/null +++ b/examples/vue/column-resizing-performant/src/App.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/examples/vue/column-resizing-performant/src/env.d.ts b/examples/vue/column-resizing-performant/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/column-resizing-performant/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/column-resizing-performant/src/index.css b/examples/vue/column-resizing-performant/src/index.css new file mode 100644 index 0000000000..e5ad2ab030 --- /dev/null +++ b/examples/vue/column-resizing-performant/src/index.css @@ -0,0 +1,72 @@ +* { + box-sizing: border-box; +} + +html { + font-family: sans-serif; + font-size: 14px; +} + +table, +.divTable { + border: 1px solid lightgray; + width: fit-content; +} + +.tr { + display: flex; +} + +tr, +.tr { + width: fit-content; + height: 30px; +} + +th, +.th, +td, +.td { + box-shadow: inset 0 0 0 1px lightgray; + padding: 0.25rem; +} + +th, +.th { + padding: 2px 4px; + position: relative; + font-weight: bold; + text-align: center; + height: 30px; +} + +td, +.td { + height: 30px; +} + +.resizer { + position: absolute; + top: 0; + height: 100%; + width: 5px; + background: rgba(0, 0, 0, 0.5); + cursor: col-resize; + user-select: none; + touch-action: none; +} + +.resizer.isResizing { + background: blue; + opacity: 1; +} + +@media (hover: hover) { + .resizer { + opacity: 0; + } + + *:hover > .resizer { + opacity: 1; + } +} diff --git a/examples/vue/column-resizing-performant/src/main.ts b/examples/vue/column-resizing-performant/src/main.ts new file mode 100644 index 0000000000..01433bca2a --- /dev/null +++ b/examples/vue/column-resizing-performant/src/main.ts @@ -0,0 +1,4 @@ +import { createApp } from 'vue' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/examples/vue/column-resizing-performant/src/makeData.ts b/examples/vue/column-resizing-performant/src/makeData.ts new file mode 100644 index 0000000000..8675eacca6 --- /dev/null +++ b/examples/vue/column-resizing-performant/src/makeData.ts @@ -0,0 +1,43 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) arr.push(i) + return arr +} + +const newPerson = (): Person => ({ + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, +}) + +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth]! + return range(len).map( + (): Person => ({ + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + }), + ) + } + return makeDataLevel() +} diff --git a/examples/vue/column-resizing-performant/tsconfig.json b/examples/vue/column-resizing-performant/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/column-resizing-performant/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/column-resizing-performant/vite.config.ts b/examples/vue/column-resizing-performant/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/column-resizing-performant/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/column-resizing/README.md b/examples/vue/column-resizing/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/column-resizing/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/column-resizing/env.d.ts b/examples/vue/column-resizing/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/column-resizing/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/column-resizing/index.html b/examples/vue/column-resizing/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/column-resizing/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/column-resizing/package.json b/examples/vue/column-resizing/package.json new file mode 100644 index 0000000000..b2e1b3d690 --- /dev/null +++ b/examples/vue/column-resizing/package.json @@ -0,0 +1,25 @@ +{ + "name": "tanstack-table-example-vue-column-resizing", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "vue": "^3.5.32" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/column-resizing/src/App.vue b/examples/vue/column-resizing/src/App.vue new file mode 100644 index 0000000000..3d6c07bb16 --- /dev/null +++ b/examples/vue/column-resizing/src/App.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/examples/vue/column-resizing/src/env.d.ts b/examples/vue/column-resizing/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/column-resizing/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/column-resizing/src/index.css b/examples/vue/column-resizing/src/index.css new file mode 100644 index 0000000000..5a32330d58 --- /dev/null +++ b/examples/vue/column-resizing/src/index.css @@ -0,0 +1,80 @@ +* { + box-sizing: border-box; +} + +html { + font-family: sans-serif; + font-size: 14px; +} + +table, +.divTable { + border: 1px solid lightgray; + width: fit-content; +} + +.tr { + display: flex; +} + +tr, +.tr { + width: fit-content; + height: 30px; +} + +th, +.th, +td, +.td { + box-shadow: inset 0 0 0 1px lightgray; + padding: 0.25rem; +} + +th, +.th { + padding: 2px 4px; + position: relative; + font-weight: bold; + text-align: center; + height: 30px; +} + +td, +.td { + height: 30px; +} + +.resizer { + position: absolute; + top: 0; + height: 100%; + width: 5px; + background: rgba(0, 0, 0, 0.5); + cursor: col-resize; + user-select: none; + touch-action: none; +} + +.resizer.ltr { + right: 0; +} + +.resizer.rtl { + left: 0; +} + +.resizer.isResizing { + background: blue; + opacity: 1; +} + +@media (hover: hover) { + .resizer { + opacity: 0; + } + + *:hover > .resizer { + opacity: 1; + } +} diff --git a/examples/vue/column-resizing/src/main.ts b/examples/vue/column-resizing/src/main.ts new file mode 100644 index 0000000000..01433bca2a --- /dev/null +++ b/examples/vue/column-resizing/src/main.ts @@ -0,0 +1,4 @@ +import { createApp } from 'vue' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/examples/vue/column-resizing/src/makeData.ts b/examples/vue/column-resizing/src/makeData.ts new file mode 100644 index 0000000000..b9055b2d8c --- /dev/null +++ b/examples/vue/column-resizing/src/makeData.ts @@ -0,0 +1,48 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0], + } +} + +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth] + return range(len).map((_d): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + + return makeDataLevel() +} diff --git a/examples/vue/column-resizing/tsconfig.json b/examples/vue/column-resizing/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/column-resizing/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/column-resizing/vite.config.ts b/examples/vue/column-resizing/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/column-resizing/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/column-sizing/README.md b/examples/vue/column-sizing/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/column-sizing/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/column-sizing/env.d.ts b/examples/vue/column-sizing/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/column-sizing/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/column-sizing/index.html b/examples/vue/column-sizing/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/column-sizing/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/column-sizing/package.json b/examples/vue/column-sizing/package.json new file mode 100644 index 0000000000..38401f67ba --- /dev/null +++ b/examples/vue/column-sizing/package.json @@ -0,0 +1,25 @@ +{ + "name": "tanstack-table-example-vue-column-sizing", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "vue": "^3.5.32" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/column-sizing/src/App.vue b/examples/vue/column-sizing/src/App.vue new file mode 100644 index 0000000000..3d6c07bb16 --- /dev/null +++ b/examples/vue/column-sizing/src/App.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/examples/vue/column-sizing/src/env.d.ts b/examples/vue/column-sizing/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/column-sizing/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/column-sizing/src/index.css b/examples/vue/column-sizing/src/index.css new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/vue/column-sizing/src/index.css @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/column-sizing/src/main.ts b/examples/vue/column-sizing/src/main.ts new file mode 100644 index 0000000000..01433bca2a --- /dev/null +++ b/examples/vue/column-sizing/src/main.ts @@ -0,0 +1,4 @@ +import { createApp } from 'vue' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/examples/vue/column-sizing/src/makeData.ts b/examples/vue/column-sizing/src/makeData.ts new file mode 100644 index 0000000000..b9055b2d8c --- /dev/null +++ b/examples/vue/column-sizing/src/makeData.ts @@ -0,0 +1,48 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0], + } +} + +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth] + return range(len).map((_d): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + + return makeDataLevel() +} diff --git a/examples/vue/column-sizing/tsconfig.json b/examples/vue/column-sizing/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/column-sizing/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/column-sizing/vite.config.ts b/examples/vue/column-sizing/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/column-sizing/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/column-visibility/README.md b/examples/vue/column-visibility/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/column-visibility/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/column-visibility/env.d.ts b/examples/vue/column-visibility/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/column-visibility/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/column-visibility/index.html b/examples/vue/column-visibility/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/column-visibility/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/column-visibility/package.json b/examples/vue/column-visibility/package.json new file mode 100644 index 0000000000..10f75f3d77 --- /dev/null +++ b/examples/vue/column-visibility/package.json @@ -0,0 +1,25 @@ +{ + "name": "tanstack-table-example-vue-column-visibility", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "vue": "^3.5.32" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/column-visibility/src/App.tsx b/examples/vue/column-visibility/src/App.tsx new file mode 100644 index 0000000000..b3ea8f7366 --- /dev/null +++ b/examples/vue/column-visibility/src/App.tsx @@ -0,0 +1,211 @@ +import { defineComponent, ref } from 'vue' +import { + Cell, + Column, + FlexRender, + Header, + HeaderGroup, + Row, + columnVisibilityFeature, + tableFeatures, + useTable, +} from '@tanstack/vue-table' +import type { ColumnDef } from '@tanstack/vue-table' + +type Person = { + firstName: string + lastName: string + age: number + visits: number + status: string + progress: number +} + +const defaultData: Array = [ + { + firstName: 'tanner', + lastName: 'linsley', + age: 24, + visits: 100, + status: 'In Relationship', + progress: 50, + }, + { + firstName: 'tandy', + lastName: 'miller', + age: 40, + visits: 40, + status: 'Single', + progress: 80, + }, + { + firstName: 'joe', + lastName: 'dirte', + age: 45, + visits: 20, + status: 'Complicated', + progress: 10, + }, +] + +const _features = tableFeatures({ columnVisibilityFeature }) + +const columns: Array> = [ + { + header: 'Name', + footer: (props) => props.column.id, + columns: [ + { + accessorKey: 'firstName', + cell: (info) => info.getValue(), + footer: (props) => props.column.id, + }, + { + accessorFn: (row) => row.lastName, + id: 'lastName', + cell: (info) => info.getValue(), + header: () => Last Name, + footer: (props) => props.column.id, + }, + ], + }, + { + header: 'Info', + footer: (props) => props.column.id, + columns: [ + { + accessorKey: 'age', + header: () => 'Age', + footer: (props) => props.column.id, + }, + { + header: 'More Info', + columns: [ + { + accessorKey: 'visits', + header: () => Visits, + footer: (props) => props.column.id, + }, + { + accessorKey: 'status', + header: 'Status', + footer: (props) => props.column.id, + }, + { + accessorKey: 'progress', + header: 'Profile Progress', + footer: (props) => props.column.id, + }, + ], + }, + ], + }, +] + +export default defineComponent({ + name: 'ColumnVisibilityExample', + setup() { + const data = ref(defaultData) + const table = useTable({ + debugTable: true, + _features, + columns, + get data() { + return data.value + }, + }) + + const rerender = () => { + data.value = defaultData + } + + return () => ( +
+
+
+ +
+ {table + .getAllLeafColumns() + .map((column: Column) => ( +
+ +
+ ))} +
+
+ + + {table + .getHeaderGroups() + .map((headerGroup: HeaderGroup) => ( + + {headerGroup.headers.map( + (header: Header) => ( + + ), + )} + + ))} + + + {table + .getRowModel() + .rows.map((row: Row) => ( + + {row + .getVisibleCells() + .map((cell: Cell) => ( + + ))} + + ))} + + + {table + .getFooterGroups() + .map((footerGroup: HeaderGroup) => ( + + {footerGroup.headers.map( + (header: Header) => ( + + ), + )} + + ))} + +
+ {header.isPlaceholder ? null : ( + + )} +
+ +
+ {header.isPlaceholder ? null : ( + + )} +
+
+ +
+
{JSON.stringify(table.store.state, null, 2)}
+
+ ) + }, +}) diff --git a/examples/vue/column-visibility/src/App.vue b/examples/vue/column-visibility/src/App.vue new file mode 100644 index 0000000000..4256c2000a --- /dev/null +++ b/examples/vue/column-visibility/src/App.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/vue/column-visibility/src/env.d.ts b/examples/vue/column-visibility/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/column-visibility/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/column-visibility/src/index.css b/examples/vue/column-visibility/src/index.css new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/vue/column-visibility/src/index.css @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/column-visibility/src/main.ts b/examples/vue/column-visibility/src/main.ts new file mode 100644 index 0000000000..50a4dab0d5 --- /dev/null +++ b/examples/vue/column-visibility/src/main.ts @@ -0,0 +1,5 @@ +import { createApp } from 'vue' +import App from './App.vue' +import './index.css' + +createApp(App).mount('#app') diff --git a/examples/vue/column-visibility/tsconfig.json b/examples/vue/column-visibility/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/column-visibility/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/column-visibility/vite.config.ts b/examples/vue/column-visibility/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/column-visibility/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/composable-tables/package.json b/examples/vue/composable-tables/package.json index 9a685b7674..8ce8dbb769 100644 --- a/examples/vue/composable-tables/package.json +++ b/examples/vue/composable-tables/package.json @@ -17,6 +17,7 @@ "devDependencies": { "@types/node": "^25.6.0", "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "6.0.3", "vite": "^8.0.8", "vue-tsc": "^3.2.6" diff --git a/examples/vue/composable-tables/src/components/ProductsTable.vue b/examples/vue/composable-tables/src/components/ProductsTable.vue index 7e3cd8b3c3..dd960f468b 100644 --- a/examples/vue/composable-tables/src/components/ProductsTable.vue +++ b/examples/vue/composable-tables/src/components/ProductsTable.vue @@ -40,6 +40,7 @@ function refreshData() { } const table = useAppTable({ + debugTable: true, columns, data, initialState: { diff --git a/examples/vue/composable-tables/src/components/UsersTable.vue b/examples/vue/composable-tables/src/components/UsersTable.vue index 1f71ff30ee..5c48320c38 100644 --- a/examples/vue/composable-tables/src/components/UsersTable.vue +++ b/examples/vue/composable-tables/src/components/UsersTable.vue @@ -50,6 +50,7 @@ function refreshData() { } const table = useAppTable({ + debugTable: true, columns, data, initialState: { diff --git a/examples/vue/composable-tables/src/index.css b/examples/vue/composable-tables/src/index.css new file mode 100644 index 0000000000..d7a5ed6c49 --- /dev/null +++ b/examples/vue/composable-tables/src/index.css @@ -0,0 +1,249 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; + border-collapse: collapse; + width: 100%; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th, +td { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 8px 12px; + text-align: left; +} + +th { + background-color: #f5f5f5; + font-weight: 600; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} + +.table-container { + padding: 16px; + max-width: 1200px; + margin: 0 auto; +} + +.pagination { + display: flex; + align-items: center; + gap: 8px; + margin-top: 16px; + flex-wrap: wrap; +} + +.pagination button { + border: 1px solid #ccc; + border-radius: 4px; + padding: 4px 8px; + cursor: pointer; + background: white; +} + +.pagination button:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +.pagination input { + border: 1px solid #ccc; + border-radius: 4px; + padding: 4px; + width: 64px; +} + +.pagination select { + border: 1px solid #ccc; + border-radius: 4px; + padding: 4px; +} + +.sort-indicator { + margin-left: 4px; +} + +.column-filter { + margin-top: 4px; +} + +.column-filter input { + border: 1px solid #ccc; + border-radius: 4px; + padding: 4px; + width: 100%; + font-size: 12px; +} + +.sortable-header { + cursor: pointer; + user-select: none; +} + +.sortable-header:hover { + background-color: #e8e8e8; +} + +.row-actions { + display: flex; + gap: 4px; +} + +.row-actions button { + border: 1px solid #ccc; + border-radius: 4px; + padding: 2px 8px; + cursor: pointer; + background: white; + font-size: 12px; +} + +.row-actions button:hover { + background-color: #f0f0f0; +} + +.status-badge { + display: inline-block; + padding: 2px 8px; + border-radius: 12px; + font-size: 12px; + font-weight: 500; +} + +.status-badge.relationship { + background-color: #d4edda; + color: #155724; +} + +.status-badge.complicated { + background-color: #fff3cd; + color: #856404; +} + +.status-badge.single { + background-color: #cce5ff; + color: #004085; +} + +.progress-bar { + width: 100%; + height: 8px; + background-color: #e9ecef; + border-radius: 4px; + overflow: hidden; +} + +.progress-bar-fill { + height: 100%; + background-color: #007bff; + transition: width 0.2s; +} + +.table-toolbar { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 16px; + flex-wrap: wrap; + gap: 8px; +} + +.table-toolbar h2 { + margin: 0; +} + +.table-toolbar button { + border: 1px solid #ccc; + border-radius: 4px; + padding: 8px 16px; + cursor: pointer; + background: white; +} + +.table-toolbar button:hover { + background-color: #f0f0f0; +} + +.row-count { + color: #666; + font-size: 14px; + margin-top: 8px; +} + +.app { + padding: 16px; +} + +.app h1 { + text-align: center; + margin-bottom: 8px; +} + +.description { + text-align: center; + color: #666; + margin-bottom: 32px; +} + +.description code { + background-color: #f5f5f5; + padding: 2px 6px; + border-radius: 4px; + font-size: 13px; +} + +.table-divider { + height: 48px; + border-bottom: 1px solid #e0e0e0; + margin: 32px auto; + max-width: 1200px; +} + +.category-badge { + display: inline-block; + padding: 2px 8px; + border-radius: 12px; + font-size: 12px; + font-weight: 500; + text-transform: capitalize; +} + +.category-badge.electronics { + background-color: #e3f2fd; + color: #1565c0; +} + +.category-badge.clothing { + background-color: #fce4ec; + color: #c2185b; +} + +.category-badge.food { + background-color: #e8f5e9; + color: #2e7d32; +} + +.category-badge.books { + background-color: #fff8e1; + color: #f57c00; +} + +.price { + font-weight: 600; + color: #2e7d32; +} diff --git a/examples/vue/composable-tables/src/makeData.ts b/examples/vue/composable-tables/src/makeData.ts index 4bd55acd52..17dec1c6de 100644 --- a/examples/vue/composable-tables/src/makeData.ts +++ b/examples/vue/composable-tables/src/makeData.ts @@ -1,51 +1,77 @@ +import { faker } from '@faker-js/faker' + export type Person = { - id: string firstName: string lastName: string age: number visits: number - status: string progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array } export type Product = { id: string name: string - category: string + category: 'electronics' | 'clothing' | 'food' | 'books' price: number stock: number rating: number } -const firstNames = ['Tanner', 'Tandy', 'Joe', 'Kevin', 'Alicia', 'Morgan'] -const lastNames = ['Linsley', 'Miller', 'Dirte', 'Vandy', 'Cole', 'West'] -const statuses = ['Single', 'Complicated', 'In Relationship'] -const productNames = ['Desk Lamp', 'Notebook', 'Chair', 'Monitor', 'Keyboard'] -const categories = ['Office', 'Electronics', 'Accessories'] +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0], + } +} -function pick(values: Array, index: number) { - return values[index % values.length] +const newProduct = (): Product => { + return { + id: faker.string.uuid(), + name: faker.commerce.productName(), + category: faker.helpers.shuffle([ + 'electronics', + 'clothing', + 'food', + 'books', + ])[0], + price: parseFloat(faker.commerce.price({ min: 5, max: 500 })), + stock: faker.number.int({ min: 0, max: 200 }), + rating: faker.number.int({ min: 0, max: 100 }), + } } -export function makeData(length: number): Array { - return Array.from({ length }, (_, index) => ({ - id: `person_${index}`, - firstName: pick(firstNames, index), - lastName: pick(lastNames, index * 2), - age: 20 + (index % 35), - visits: 10 + ((index * 17) % 150), - status: pick(statuses, index), - progress: (index * 13) % 100, - })) +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth] + return range(len).map((): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + + return makeDataLevel() } -export function makeProductData(length: number): Array { - return Array.from({ length }, (_, index) => ({ - id: `product_${index}`, - name: `${pick(productNames, index)} ${index + 1}`, - category: pick(categories, index), - price: 10 + ((index * 7) % 90), - stock: 1 + ((index * 11) % 40), - rating: 40 + ((index * 9) % 60), - })) +export function makeProductData(count: number): Array { + return range(count).map(() => newProduct()) } diff --git a/examples/vue/composable-tables/tsconfig.json b/examples/vue/composable-tables/tsconfig.json index af40b2d681..98d8993d70 100644 --- a/examples/vue/composable-tables/tsconfig.json +++ b/examples/vue/composable-tables/tsconfig.json @@ -11,6 +11,7 @@ "isolatedModules": true, "noEmit": true, "jsx": "preserve", + "jsxImportSource": "vue", "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, diff --git a/examples/vue/composable-tables/vite.config.ts b/examples/vue/composable-tables/vite.config.ts index c40aa3c361..3dec1c870d 100644 --- a/examples/vue/composable-tables/vite.config.ts +++ b/examples/vue/composable-tables/vite.config.ts @@ -1,6 +1,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' export default defineConfig({ - plugins: [vue()], + plugins: [vue(), vueJsx()], }) diff --git a/examples/vue/expanding/README.md b/examples/vue/expanding/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/expanding/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/expanding/env.d.ts b/examples/vue/expanding/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/expanding/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/expanding/index.html b/examples/vue/expanding/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/expanding/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/expanding/package.json b/examples/vue/expanding/package.json new file mode 100644 index 0000000000..9bc9d6d2f8 --- /dev/null +++ b/examples/vue/expanding/package.json @@ -0,0 +1,25 @@ +{ + "name": "tanstack-table-example-vue-expanding", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "vue": "^3.5.32" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/expanding/src/App.tsx b/examples/vue/expanding/src/App.tsx new file mode 100644 index 0000000000..96e95ad5cd --- /dev/null +++ b/examples/vue/expanding/src/App.tsx @@ -0,0 +1,333 @@ +import { defineComponent, ref, watchEffect } from 'vue' +import { + FlexRender, + columnFilteringFeature, + createColumnHelper, + createExpandedRowModel, + createFilteredRowModel, + createPaginatedRowModel, + createSortedRowModel, + filterFns, + rowExpandingFeature, + rowPaginationFeature, + rowSelectionFeature, + rowSortingFeature, + sortFns, + tableFeatures, + useTable, +} from '@tanstack/vue-table' +import { makeData } from './makeData' +import type { + Cell, + Column, + Header, + HeaderGroup, + Row, + Table, +} from '@tanstack/vue-table' +import type { Person } from './makeData' + +const _features = tableFeatures({ + columnFilteringFeature, + rowExpandingFeature, + rowPaginationFeature, + rowSortingFeature, + rowSelectionFeature, +}) + +const columnHelper = createColumnHelper() + +const IndeterminateCheckbox = defineComponent({ + name: 'IndeterminateCheckbox', + props: { + checked: Boolean, + indeterminate: Boolean, + onChange: Function, + className: String, + }, + setup(props) { + const inputRef = ref(null) + + watchEffect(() => { + if (inputRef.value) { + inputRef.value.indeterminate = !props.checked && !!props.indeterminate + } + }) + + return () => ( + + ) + }, +}) + +function renderFilter( + column: Column, + table: Table, +) { + const firstValue = table + .getPreFilteredRowModel() + .flatRows[0]?.getValue(column.id) + + const columnFilterValue = column.getFilterValue() + + if (typeof firstValue === 'number') { + return ( +
+ + column.setFilterValue((old: [number, number] | undefined) => { + const target = event.currentTarget as HTMLInputElement + return [target.value, old?.[1]] + }) + } + placeholder="Min" + class="w-24 border shadow rounded" + /> + + column.setFilterValue((old: [number, number] | undefined) => { + const target = event.currentTarget as HTMLInputElement + return [old?.[0], target.value] + }) + } + placeholder="Max" + class="w-24 border shadow rounded" + /> +
+ ) + } + + return ( + + column.setFilterValue((event.currentTarget as HTMLInputElement).value) + } + placeholder="Search..." + class="w-36 border shadow rounded" + /> + ) +} + +export default defineComponent({ + name: 'ExpandingExample', + setup() { + const data = ref(makeData(100, 5, 3)) + const refreshData = () => { + data.value = makeData(100, 5, 3) + } + + const columns = columnHelper.columns([ + columnHelper.accessor('firstName', { + header: ({ table }) => ( + <> + {' '} + {' '} + First Name + + ), + cell: ({ row, getValue }) => ( +
+
+ {' '} + {row.getCanExpand() ? ( + + ) : ( + '🔵' + )}{' '} + {getValue()} +
+
+ ), + footer: (props) => props.column.id, + }), + columnHelper.accessor((row) => row.lastName, { + id: 'lastName', + cell: (info) => info.getValue(), + header: () => Last Name, + footer: (props) => props.column.id, + }), + columnHelper.accessor('age', { + header: () => 'Age', + footer: (props) => props.column.id, + filterFn: 'between', + }), + columnHelper.accessor('visits', { + header: () => Visits, + footer: (props) => props.column.id, + }), + columnHelper.accessor('status', { + header: 'Status', + footer: (props) => props.column.id, + }), + columnHelper.accessor('progress', { + header: 'Profile Progress', + footer: (props) => props.column.id, + }), + ]) + + const table = useTable({ + _features, + _rowModels: { + expandedRowModel: createExpandedRowModel(), + filteredRowModel: createFilteredRowModel(filterFns), + paginatedRowModel: createPaginatedRowModel(), + sortedRowModel: createSortedRowModel(sortFns), + }, + columns, + get data() { + return data.value + }, + getSubRows: (row: Person) => row.subRows, + debugTable: true, + }) + + return () => ( +
+
+ + + {table + .getHeaderGroups() + .map((headerGroup: HeaderGroup) => ( + + {headerGroup.headers.map( + (header: Header) => ( + + ), + )} + + ))} + + + {table + .getRowModel() + .rows.map((row: Row) => ( + + {row + .getAllCells() + .map((cell: Cell) => ( + + ))} + + ))} + +
+ {header.isPlaceholder ? null : ( +
+ + {header.column.getCanFilter() ? ( +
{renderFilter(header.column, table)}
+ ) : null} +
+ )} +
+ +
+
+
+ + + + + +
Page
+ + {table.store.state.pagination.pageIndex + 1} of{' '} + {table.getPageCount()} + +
+ + | Go to page: + { + const target = event.currentTarget as HTMLInputElement + const page = target.value ? Number(target.value) - 1 : 0 + table.setPageIndex(page) + }} + class="border p-1 rounded w-16" + /> + + +
+
{table.getRowModel().rows.length} Rows
+
+ +
+
{JSON.stringify(table.store.state, null, 2)}
+
+ ) + }, +}) diff --git a/examples/vue/expanding/src/App.vue b/examples/vue/expanding/src/App.vue new file mode 100644 index 0000000000..4256c2000a --- /dev/null +++ b/examples/vue/expanding/src/App.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/vue/expanding/src/env.d.ts b/examples/vue/expanding/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/expanding/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/expanding/src/index.css b/examples/vue/expanding/src/index.css new file mode 100644 index 0000000000..12d71033f0 --- /dev/null +++ b/examples/vue/expanding/src/index.css @@ -0,0 +1,21 @@ +html { + font-family: sans-serif; + font-size: 14px; +} +table { + border: 1px solid lightgray; +} +tbody { + border-bottom: 1px solid lightgray; +} +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} +tfoot { + color: gray; +} +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/expanding/src/main.ts b/examples/vue/expanding/src/main.ts new file mode 100644 index 0000000000..50a4dab0d5 --- /dev/null +++ b/examples/vue/expanding/src/main.ts @@ -0,0 +1,5 @@ +import { createApp } from 'vue' +import App from './App.vue' +import './index.css' + +createApp(App).mount('#app') diff --git a/examples/vue/expanding/src/makeData.ts b/examples/vue/expanding/src/makeData.ts new file mode 100644 index 0000000000..8675eacca6 --- /dev/null +++ b/examples/vue/expanding/src/makeData.ts @@ -0,0 +1,43 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) arr.push(i) + return arr +} + +const newPerson = (): Person => ({ + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, +}) + +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth]! + return range(len).map( + (): Person => ({ + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + }), + ) + } + return makeDataLevel() +} diff --git a/examples/vue/expanding/tsconfig.json b/examples/vue/expanding/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/expanding/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/expanding/vite.config.ts b/examples/vue/expanding/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/expanding/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/filters-faceted/README.md b/examples/vue/filters-faceted/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/filters-faceted/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/filters-faceted/env.d.ts b/examples/vue/filters-faceted/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/filters-faceted/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/filters-faceted/index.html b/examples/vue/filters-faceted/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/filters-faceted/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/filters-faceted/package.json b/examples/vue/filters-faceted/package.json new file mode 100644 index 0000000000..06c6251d2e --- /dev/null +++ b/examples/vue/filters-faceted/package.json @@ -0,0 +1,25 @@ +{ + "name": "tanstack-table-example-vue-filters-faceted", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "vue": "^3.5.32" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/filters-faceted/src/App.vue b/examples/vue/filters-faceted/src/App.vue new file mode 100644 index 0000000000..3d6c07bb16 --- /dev/null +++ b/examples/vue/filters-faceted/src/App.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/examples/vue/filters-faceted/src/env.d.ts b/examples/vue/filters-faceted/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/filters-faceted/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/filters-faceted/src/index.css b/examples/vue/filters-faceted/src/index.css new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/vue/filters-faceted/src/index.css @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/filters-faceted/src/main.ts b/examples/vue/filters-faceted/src/main.ts new file mode 100644 index 0000000000..01433bca2a --- /dev/null +++ b/examples/vue/filters-faceted/src/main.ts @@ -0,0 +1,4 @@ +import { createApp } from 'vue' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/examples/vue/filters-faceted/src/makeData.ts b/examples/vue/filters-faceted/src/makeData.ts new file mode 100644 index 0000000000..b9055b2d8c --- /dev/null +++ b/examples/vue/filters-faceted/src/makeData.ts @@ -0,0 +1,48 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0], + } +} + +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth] + return range(len).map((_d): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + + return makeDataLevel() +} diff --git a/examples/vue/filters-faceted/tsconfig.json b/examples/vue/filters-faceted/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/filters-faceted/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/filters-faceted/vite.config.ts b/examples/vue/filters-faceted/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/filters-faceted/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/filters-fuzzy/README.md b/examples/vue/filters-fuzzy/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/filters-fuzzy/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/filters-fuzzy/env.d.ts b/examples/vue/filters-fuzzy/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/filters-fuzzy/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/filters-fuzzy/index.html b/examples/vue/filters-fuzzy/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/filters-fuzzy/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/filters-fuzzy/package.json b/examples/vue/filters-fuzzy/package.json new file mode 100644 index 0000000000..afe7ae2bd7 --- /dev/null +++ b/examples/vue/filters-fuzzy/package.json @@ -0,0 +1,25 @@ +{ + "name": "tanstack-table-example-vue-filters-fuzzy", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "vue": "^3.5.32" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/filters-fuzzy/src/App.vue b/examples/vue/filters-fuzzy/src/App.vue new file mode 100644 index 0000000000..3d6c07bb16 --- /dev/null +++ b/examples/vue/filters-fuzzy/src/App.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/examples/vue/filters-fuzzy/src/env.d.ts b/examples/vue/filters-fuzzy/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/filters-fuzzy/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/filters-fuzzy/src/index.css b/examples/vue/filters-fuzzy/src/index.css new file mode 100644 index 0000000000..12d71033f0 --- /dev/null +++ b/examples/vue/filters-fuzzy/src/index.css @@ -0,0 +1,21 @@ +html { + font-family: sans-serif; + font-size: 14px; +} +table { + border: 1px solid lightgray; +} +tbody { + border-bottom: 1px solid lightgray; +} +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} +tfoot { + color: gray; +} +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/filters-fuzzy/src/main.ts b/examples/vue/filters-fuzzy/src/main.ts new file mode 100644 index 0000000000..01433bca2a --- /dev/null +++ b/examples/vue/filters-fuzzy/src/main.ts @@ -0,0 +1,4 @@ +import { createApp } from 'vue' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/examples/vue/filters-fuzzy/src/makeData.ts b/examples/vue/filters-fuzzy/src/makeData.ts new file mode 100644 index 0000000000..396d62185b --- /dev/null +++ b/examples/vue/filters-fuzzy/src/makeData.ts @@ -0,0 +1,45 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + id: number + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) arr.push(i) + return arr +} + +const newPerson = (num: number): Person => ({ + id: num, + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, +}) + +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth]! + return range(len).map( + (index): Person => ({ + ...newPerson(index), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + }), + ) + } + return makeDataLevel() +} diff --git a/examples/vue/filters-fuzzy/tsconfig.json b/examples/vue/filters-fuzzy/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/filters-fuzzy/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/filters-fuzzy/vite.config.ts b/examples/vue/filters-fuzzy/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/filters-fuzzy/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/filters/package.json b/examples/vue/filters/package.json index fbef700552..372ffefdbc 100644 --- a/examples/vue/filters/package.json +++ b/examples/vue/filters/package.json @@ -17,6 +17,7 @@ "devDependencies": { "@types/node": "^25.6.0", "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "6.0.3", "vite": "^8.0.8", "vue-tsc": "^3.2.6" diff --git a/examples/vue/filters/src/App.vue b/examples/vue/filters/src/App.vue index 89eb559832..05f7dd2952 100644 --- a/examples/vue/filters/src/App.vue +++ b/examples/vue/filters/src/App.vue @@ -88,6 +88,7 @@ const rerender = () => { const table = useAppTable( { + debugTable: true, data, get columns() { return columns.value diff --git a/examples/vue/filters/src/index.css b/examples/vue/filters/src/index.css new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/vue/filters/src/index.css @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/filters/src/makeData.ts b/examples/vue/filters/src/makeData.ts new file mode 100644 index 0000000000..b9055b2d8c --- /dev/null +++ b/examples/vue/filters/src/makeData.ts @@ -0,0 +1,48 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0], + } +} + +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth] + return range(len).map((_d): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + + return makeDataLevel() +} diff --git a/examples/vue/filters/tsconfig.json b/examples/vue/filters/tsconfig.json index 0b8e08b465..84f3f40987 100644 --- a/examples/vue/filters/tsconfig.json +++ b/examples/vue/filters/tsconfig.json @@ -13,6 +13,7 @@ "isolatedModules": true, "noEmit": true, "jsx": "preserve", + "jsxImportSource": "vue", /* Linting */ "strict": true, diff --git a/examples/vue/filters/vite.config.ts b/examples/vue/filters/vite.config.ts index 05c17402a4..3dec1c870d 100644 --- a/examples/vue/filters/vite.config.ts +++ b/examples/vue/filters/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' -// https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], + plugins: [vue(), vueJsx()], }) diff --git a/examples/vue/grouping/README.md b/examples/vue/grouping/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/grouping/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/grouping/env.d.ts b/examples/vue/grouping/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/grouping/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/grouping/index.html b/examples/vue/grouping/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/grouping/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/pagination-controlled/package.json b/examples/vue/grouping/package.json similarity index 84% rename from examples/vue/pagination-controlled/package.json rename to examples/vue/grouping/package.json index d4e8d73885..5911c51fe6 100644 --- a/examples/vue/pagination-controlled/package.json +++ b/examples/vue/grouping/package.json @@ -1,5 +1,5 @@ { - "name": "tanstack-table-example-vue-pagination-controlled", + "name": "tanstack-table-example-vue-grouping", "private": true, "version": "0.0.0", "scripts": { @@ -17,6 +17,7 @@ "devDependencies": { "@types/node": "^25.6.0", "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "6.0.3", "vite": "^8.0.8", "vue-tsc": "^3.2.6" diff --git a/examples/vue/grouping/src/App.vue b/examples/vue/grouping/src/App.vue new file mode 100644 index 0000000000..3d6c07bb16 --- /dev/null +++ b/examples/vue/grouping/src/App.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/examples/vue/grouping/src/env.d.ts b/examples/vue/grouping/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/grouping/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/grouping/src/index.css b/examples/vue/grouping/src/index.css new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/vue/grouping/src/index.css @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/grouping/src/main.ts b/examples/vue/grouping/src/main.ts new file mode 100644 index 0000000000..01433bca2a --- /dev/null +++ b/examples/vue/grouping/src/main.ts @@ -0,0 +1,4 @@ +import { createApp } from 'vue' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/examples/vue/grouping/src/makeData.ts b/examples/vue/grouping/src/makeData.ts new file mode 100644 index 0000000000..8675eacca6 --- /dev/null +++ b/examples/vue/grouping/src/makeData.ts @@ -0,0 +1,43 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) arr.push(i) + return arr +} + +const newPerson = (): Person => ({ + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, +}) + +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth]! + return range(len).map( + (): Person => ({ + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + }), + ) + } + return makeDataLevel() +} diff --git a/examples/vue/grouping/tsconfig.json b/examples/vue/grouping/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/grouping/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/grouping/vite.config.ts b/examples/vue/grouping/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/grouping/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/pagination-controlled/public/favicon.ico b/examples/vue/pagination-controlled/public/favicon.ico deleted file mode 100644 index df36fcfb72584e00488330b560ebcf34a41c64c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4286 zcmds*O-Phc6o&64GDVCEQHxsW(p4>LW*W<827=Unuo8sGpRux(DN@jWP-e29Wl%wj zY84_aq9}^Am9-cWTD5GGEo#+5Fi2wX_P*bo+xO!)p*7B;iKlbFd(U~_d(U?#hLj56 zPhFkj-|A6~Qk#@g^#D^U0XT1cu=c-vu1+SElX9NR;kzAUV(q0|dl0|%h|dI$%VICy zJnu2^L*Te9JrJMGh%-P79CL0}dq92RGU6gI{v2~|)p}sG5x0U*z<8U;Ij*hB9z?ei z@g6Xq-pDoPl=MANPiR7%172VA%r)kevtV-_5H*QJKFmd;8yA$98zCxBZYXTNZ#QFk2(TX0;Y2dt&WitL#$96|gJY=3xX zpCoi|YNzgO3R`f@IiEeSmKrPSf#h#Qd<$%Ej^RIeeYfsxhPMOG`S`Pz8q``=511zm zAm)MX5AV^5xIWPyEu7u>qYs?pn$I4nL9J!=K=SGlKLXpE<5x+2cDTXq?brj?n6sp= zphe9;_JHf40^9~}9i08r{XM$7HB!`{Ys~TK0kx<}ZQng`UPvH*11|q7&l9?@FQz;8 zx!=3<4seY*%=OlbCbcae?5^V_}*K>Uo6ZWV8mTyE^B=DKy7-sdLYkR5Z?paTgK-zyIkKjIcpyO z{+uIt&YSa_$QnN_@t~L014dyK(fOOo+W*MIxbA6Ndgr=Y!f#Tokqv}n<7-9qfHkc3 z=>a|HWqcX8fzQCT=dqVbogRq!-S>H%yA{1w#2Pn;=e>JiEj7Hl;zdt-2f+j2%DeVD zsW0Ab)ZK@0cIW%W7z}H{&~yGhn~D;aiP4=;m-HCo`BEI+Kd6 z={Xwx{TKxD#iCLfl2vQGDitKtN>z|-AdCN|$jTFDg0m3O`WLD4_s#$S diff --git a/examples/vue/pagination/package.json b/examples/vue/pagination/package.json index f5823d9313..c20113692f 100644 --- a/examples/vue/pagination/package.json +++ b/examples/vue/pagination/package.json @@ -17,6 +17,7 @@ "devDependencies": { "@types/node": "^25.6.0", "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "6.0.3", "vite": "^8.0.8", "vue-tsc": "^3.2.6" diff --git a/examples/vue/pagination/src/index.css b/examples/vue/pagination/src/index.css new file mode 100644 index 0000000000..12d71033f0 --- /dev/null +++ b/examples/vue/pagination/src/index.css @@ -0,0 +1,21 @@ +html { + font-family: sans-serif; + font-size: 14px; +} +table { + border: 1px solid lightgray; +} +tbody { + border-bottom: 1px solid lightgray; +} +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} +tfoot { + color: gray; +} +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/pagination/src/makeData.ts b/examples/vue/pagination/src/makeData.ts index 6311127267..8675eacca6 100644 --- a/examples/vue/pagination/src/makeData.ts +++ b/examples/vue/pagination/src/makeData.ts @@ -12,37 +12,32 @@ export type Person = { const range = (len: number) => { const arr: Array = [] - for (let i = 0; i < len; i++) { - arr.push(i) - } + for (let i = 0; i < len; i++) arr.push(i) return arr } -const newPerson = (): Person => { - return { - firstName: faker.person.firstName(), - lastName: faker.person.lastName(), - age: faker.number.int(40), - visits: faker.number.int(1000), - progress: faker.number.int(100), - status: faker.helpers.shuffle([ - 'relationship', - 'complicated', - 'single', - ])[0], - } -} +const newPerson = (): Person => ({ + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, +}) export function makeData(...lens: Array) { const makeDataLevel = (depth = 0): Array => { - const len = lens[depth] - return range(len).map((): Person => { - return { + const len = lens[depth]! + return range(len).map( + (): Person => ({ ...newPerson(), subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, - } - }) + }), + ) } - return makeDataLevel() } diff --git a/examples/vue/pagination/tsconfig.json b/examples/vue/pagination/tsconfig.json index 0b8e08b465..84f3f40987 100644 --- a/examples/vue/pagination/tsconfig.json +++ b/examples/vue/pagination/tsconfig.json @@ -13,6 +13,7 @@ "isolatedModules": true, "noEmit": true, "jsx": "preserve", + "jsxImportSource": "vue", /* Linting */ "strict": true, diff --git a/examples/vue/pagination/vite.config.ts b/examples/vue/pagination/vite.config.ts index 05c17402a4..3dec1c870d 100644 --- a/examples/vue/pagination/vite.config.ts +++ b/examples/vue/pagination/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' -// https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], + plugins: [vue(), vueJsx()], }) diff --git a/examples/vue/row-pinning/README.md b/examples/vue/row-pinning/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/row-pinning/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/row-pinning/env.d.ts b/examples/vue/row-pinning/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/row-pinning/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/row-pinning/index.html b/examples/vue/row-pinning/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/row-pinning/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/row-pinning/package.json b/examples/vue/row-pinning/package.json new file mode 100644 index 0000000000..2c0850e408 --- /dev/null +++ b/examples/vue/row-pinning/package.json @@ -0,0 +1,25 @@ +{ + "name": "tanstack-table-example-vue-row-pinning", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "vue": "^3.5.32" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/row-pinning/src/App.vue b/examples/vue/row-pinning/src/App.vue new file mode 100644 index 0000000000..3d6c07bb16 --- /dev/null +++ b/examples/vue/row-pinning/src/App.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/examples/vue/row-pinning/src/env.d.ts b/examples/vue/row-pinning/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/row-pinning/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/row-pinning/src/index.css b/examples/vue/row-pinning/src/index.css new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/vue/row-pinning/src/index.css @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/row-pinning/src/main.ts b/examples/vue/row-pinning/src/main.ts new file mode 100644 index 0000000000..01433bca2a --- /dev/null +++ b/examples/vue/row-pinning/src/main.ts @@ -0,0 +1,4 @@ +import { createApp } from 'vue' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/examples/vue/row-pinning/src/makeData.ts b/examples/vue/row-pinning/src/makeData.ts new file mode 100644 index 0000000000..8675eacca6 --- /dev/null +++ b/examples/vue/row-pinning/src/makeData.ts @@ -0,0 +1,43 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) arr.push(i) + return arr +} + +const newPerson = (): Person => ({ + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, +}) + +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth]! + return range(len).map( + (): Person => ({ + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + }), + ) + } + return makeDataLevel() +} diff --git a/examples/vue/row-pinning/tsconfig.json b/examples/vue/row-pinning/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/row-pinning/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/row-pinning/vite.config.ts b/examples/vue/row-pinning/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/row-pinning/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/row-selection/package.json b/examples/vue/row-selection/package.json index 4d01ed8822..b795478007 100644 --- a/examples/vue/row-selection/package.json +++ b/examples/vue/row-selection/package.json @@ -6,16 +6,17 @@ "dev": "vite", "build": "vite build", "preview": "vite preview", - "lint": "eslint ./src" + "lint": "eslint ./src", + "test:types": "vue-tsc" }, "dependencies": { "@faker-js/faker": "^10.4.0", + "@tanstack/vue-devtools": "^0.2.16", "@tanstack/vue-table": "^9.0.0-alpha.33", + "@tanstack/vue-table-devtools": "^9.0.0-alpha.33", "vue": "^3.5.32" }, "devDependencies": { - "@tanstack/vue-devtools": "^0.2.16", - "@tanstack/vue-table-devtools": "^9.0.0-alpha.33", "@types/node": "^25.6.0", "@vitejs/plugin-vue": "^6.0.6", "@vitejs/plugin-vue-jsx": "^5.1.5", diff --git a/examples/vue/row-selection/src/App.vue b/examples/vue/row-selection/src/App.vue index ca3c6b3f3a..46dba55a54 100644 --- a/examples/vue/row-selection/src/App.vue +++ b/examples/vue/row-selection/src/App.vue @@ -36,6 +36,7 @@ const columns = columnHelper.columns([ {/* @ts-ignore */} diff --git a/examples/vue/row-selection/src/IndeterminateCheckbox.vue b/examples/vue/row-selection/src/IndeterminateCheckbox.vue index a0a9c1e75f..6f821bd1a2 100644 --- a/examples/vue/row-selection/src/IndeterminateCheckbox.vue +++ b/examples/vue/row-selection/src/IndeterminateCheckbox.vue @@ -1,22 +1,31 @@ diff --git a/examples/vue/row-selection/src/index.css b/examples/vue/row-selection/src/index.css new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/vue/row-selection/src/index.css @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/row-selection/src/main.ts b/examples/vue/row-selection/src/main.ts index 3ebcb27491..50a4dab0d5 100644 --- a/examples/vue/row-selection/src/main.ts +++ b/examples/vue/row-selection/src/main.ts @@ -1,18 +1,5 @@ -import { createApp, defineComponent, h } from 'vue' -import { TanStackDevtools } from '@tanstack/vue-devtools' -import { tableDevtoolsPlugin } from '@tanstack/vue-table-devtools' +import { createApp } from 'vue' import App from './App.vue' +import './index.css' -const Root = defineComponent({ - name: 'Root', - setup() { - return () => [ - h(App), - h(TanStackDevtools, { - plugins: [tableDevtoolsPlugin()], - }), - ] - }, -}) - -createApp(Root).mount('#app') +createApp(App).mount('#app') diff --git a/examples/vue/row-selection/src/makeData.ts b/examples/vue/row-selection/src/makeData.ts index 6311127267..c34c43a03e 100644 --- a/examples/vue/row-selection/src/makeData.ts +++ b/examples/vue/row-selection/src/makeData.ts @@ -1,6 +1,7 @@ import { faker } from '@faker-js/faker' export type Person = { + id: string firstName: string lastName: string age: number @@ -20,6 +21,7 @@ const range = (len: number) => { const newPerson = (): Person => { return { + id: faker.string.uuid(), firstName: faker.person.firstName(), lastName: faker.person.lastName(), age: faker.number.int(40), @@ -36,7 +38,7 @@ const newPerson = (): Person => { export function makeData(...lens: Array) { const makeDataLevel = (depth = 0): Array => { const len = lens[depth] - return range(len).map((): Person => { + return range(len).map((_d): Person => { return { ...newPerson(), subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, diff --git a/examples/vue/row-selection/tsconfig.json b/examples/vue/row-selection/tsconfig.json index 0b8e08b465..84f3f40987 100644 --- a/examples/vue/row-selection/tsconfig.json +++ b/examples/vue/row-selection/tsconfig.json @@ -13,6 +13,7 @@ "isolatedModules": true, "noEmit": true, "jsx": "preserve", + "jsxImportSource": "vue", /* Linting */ "strict": true, diff --git a/examples/vue/row-selection/vite.config.ts b/examples/vue/row-selection/vite.config.ts index 33d651a84c..3dec1c870d 100644 --- a/examples/vue/row-selection/vite.config.ts +++ b/examples/vue/row-selection/vite.config.ts @@ -2,7 +2,6 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' -// https://vitejs.dev/config/ export default defineConfig({ plugins: [vue(), vueJsx()], }) diff --git a/examples/vue/sorting/package.json b/examples/vue/sorting/package.json index c7e3802ed4..5fe37a4aac 100644 --- a/examples/vue/sorting/package.json +++ b/examples/vue/sorting/package.json @@ -17,6 +17,7 @@ "devDependencies": { "@types/node": "^25.6.0", "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "6.0.3", "vite": "^8.0.8", "vue-tsc": "^3.2.6" diff --git a/examples/vue/sorting/src/App.vue b/examples/vue/sorting/src/App.vue index 1a7e56d724..b372323da3 100644 --- a/examples/vue/sorting/src/App.vue +++ b/examples/vue/sorting/src/App.vue @@ -45,9 +45,6 @@ const columns = columnHelper.columns([ header: 'Profile Progress', footer: (props) => props.column.id, }), - columnHelper.accessor('createdAt', { - header: 'Created At', - }), ]) const data = ref(makeData(10000)) diff --git a/examples/vue/sorting/src/index.css b/examples/vue/sorting/src/index.css new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/vue/sorting/src/index.css @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/sorting/src/makeData.ts b/examples/vue/sorting/src/makeData.ts index 8409b8dd51..b9055b2d8c 100644 --- a/examples/vue/sorting/src/makeData.ts +++ b/examples/vue/sorting/src/makeData.ts @@ -7,7 +7,6 @@ export type Person = { visits: number progress: number status: 'relationship' | 'complicated' | 'single' - createdAt: Date subRows?: Array } @@ -26,7 +25,6 @@ const newPerson = (): Person => { age: faker.number.int(40), visits: faker.number.int(1000), progress: faker.number.int(100), - createdAt: faker.date.anytime(), status: faker.helpers.shuffle([ 'relationship', 'complicated', @@ -38,7 +36,7 @@ const newPerson = (): Person => { export function makeData(...lens: Array) { const makeDataLevel = (depth = 0): Array => { const len = lens[depth] - return range(len).map((): Person => { + return range(len).map((_d): Person => { return { ...newPerson(), subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, diff --git a/examples/vue/sorting/tsconfig.json b/examples/vue/sorting/tsconfig.json index 0b8e08b465..84f3f40987 100644 --- a/examples/vue/sorting/tsconfig.json +++ b/examples/vue/sorting/tsconfig.json @@ -13,6 +13,7 @@ "isolatedModules": true, "noEmit": true, "jsx": "preserve", + "jsxImportSource": "vue", /* Linting */ "strict": true, diff --git a/examples/vue/sorting/vite.config.ts b/examples/vue/sorting/vite.config.ts index 05c17402a4..3dec1c870d 100644 --- a/examples/vue/sorting/vite.config.ts +++ b/examples/vue/sorting/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' -// https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], + plugins: [vue(), vueJsx()], }) diff --git a/examples/vue/sub-components/package.json b/examples/vue/sub-components/package.json index 87ef145963..6a387fd138 100644 --- a/examples/vue/sub-components/package.json +++ b/examples/vue/sub-components/package.json @@ -1,5 +1,5 @@ { - "name": "tanstack-table-example-vue-subcomponents", + "name": "tanstack-table-example-vue-sub-components", "private": true, "version": "0.0.0", "scripts": { @@ -17,6 +17,7 @@ "devDependencies": { "@types/node": "^25.6.0", "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "6.0.3", "vite": "^8.0.8", "vue-tsc": "^3.2.6" diff --git a/examples/vue/sub-components/src/App.vue b/examples/vue/sub-components/src/App.vue index b107b52196..0f8a3249ed 100644 --- a/examples/vue/sub-components/src/App.vue +++ b/examples/vue/sub-components/src/App.vue @@ -107,6 +107,7 @@ const rerender = () => { const table = useAppTable( { + debugTable: true, // features and row models are already defined in the createTableHook call data, columns, diff --git a/examples/vue/sub-components/src/index.css b/examples/vue/sub-components/src/index.css new file mode 100644 index 0000000000..12d71033f0 --- /dev/null +++ b/examples/vue/sub-components/src/index.css @@ -0,0 +1,21 @@ +html { + font-family: sans-serif; + font-size: 14px; +} +table { + border: 1px solid lightgray; +} +tbody { + border-bottom: 1px solid lightgray; +} +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} +tfoot { + color: gray; +} +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/sub-components/src/makeData.ts b/examples/vue/sub-components/src/makeData.ts new file mode 100644 index 0000000000..8675eacca6 --- /dev/null +++ b/examples/vue/sub-components/src/makeData.ts @@ -0,0 +1,43 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) arr.push(i) + return arr +} + +const newPerson = (): Person => ({ + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, +}) + +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth]! + return range(len).map( + (): Person => ({ + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + }), + ) + } + return makeDataLevel() +} diff --git a/examples/vue/sub-components/tsconfig.json b/examples/vue/sub-components/tsconfig.json index 0b8e08b465..84f3f40987 100644 --- a/examples/vue/sub-components/tsconfig.json +++ b/examples/vue/sub-components/tsconfig.json @@ -13,6 +13,7 @@ "isolatedModules": true, "noEmit": true, "jsx": "preserve", + "jsxImportSource": "vue", /* Linting */ "strict": true, diff --git a/examples/vue/sub-components/vite.config.ts b/examples/vue/sub-components/vite.config.ts index 05c17402a4..3dec1c870d 100644 --- a/examples/vue/sub-components/vite.config.ts +++ b/examples/vue/sub-components/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' -// https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], + plugins: [vue(), vueJsx()], }) diff --git a/examples/vue/virtualized-columns/README.md b/examples/vue/virtualized-columns/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/virtualized-columns/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/virtualized-columns/env.d.ts b/examples/vue/virtualized-columns/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/virtualized-columns/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/virtualized-columns/index.html b/examples/vue/virtualized-columns/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/virtualized-columns/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/virtualized-columns/package.json b/examples/vue/virtualized-columns/package.json new file mode 100644 index 0000000000..bcdb75dbb0 --- /dev/null +++ b/examples/vue/virtualized-columns/package.json @@ -0,0 +1,26 @@ +{ + "name": "tanstack-table-example-vue-virtualized-columns", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "@tanstack/vue-virtual": "^3.13.24", + "vue": "^3.5.32" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/virtualized-columns/src/App.vue b/examples/vue/virtualized-columns/src/App.vue new file mode 100644 index 0000000000..eac1722603 --- /dev/null +++ b/examples/vue/virtualized-columns/src/App.vue @@ -0,0 +1,232 @@ + + + diff --git a/examples/vue/virtualized-columns/src/env.d.ts b/examples/vue/virtualized-columns/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/virtualized-columns/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/virtualized-columns/src/index.css b/examples/vue/virtualized-columns/src/index.css new file mode 100644 index 0000000000..6402cb4b8b --- /dev/null +++ b/examples/vue/virtualized-columns/src/index.css @@ -0,0 +1,40 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border-collapse: collapse; + border-spacing: 0; + font-family: arial, sans-serif; + table-layout: fixed; +} + +thead { + background: lightgray; +} + +tr { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; + text-align: left; +} + +td { + padding: 6px; +} + +.container { + border: 1px solid lightgray; + margin: 1rem auto; +} + +.app { + margin: 1rem auto; + text-align: center; +} diff --git a/examples/vue/virtualized-columns/src/main.ts b/examples/vue/virtualized-columns/src/main.ts new file mode 100644 index 0000000000..50a4dab0d5 --- /dev/null +++ b/examples/vue/virtualized-columns/src/main.ts @@ -0,0 +1,5 @@ +import { createApp } from 'vue' +import App from './App.vue' +import './index.css' + +createApp(App).mount('#app') diff --git a/examples/vue/virtualized-columns/src/makeData.ts b/examples/vue/virtualized-columns/src/makeData.ts new file mode 100644 index 0000000000..837114e211 --- /dev/null +++ b/examples/vue/virtualized-columns/src/makeData.ts @@ -0,0 +1,17 @@ +import { faker } from '@faker-js/faker' + +export const makeColumns = (num: number) => + [...Array(num)].map((_, i) => ({ + accessorKey: i.toString(), + header: 'Column ' + i.toString(), + size: Math.floor(Math.random() * 150) + 100, + })) + +export const makeData = (num: number, columns: Array) => + [...Array(num)].map(() => ({ + ...Object.fromEntries( + columns.map((col: any) => [col.accessorKey, faker.person.firstName()]), + ), + })) + +export type Person = ReturnType[0] diff --git a/examples/vue/virtualized-columns/tsconfig.json b/examples/vue/virtualized-columns/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/virtualized-columns/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/virtualized-columns/vite.config.ts b/examples/vue/virtualized-columns/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/virtualized-columns/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/virtualized-infinite-scrolling/README.md b/examples/vue/virtualized-infinite-scrolling/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/virtualized-infinite-scrolling/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/virtualized-infinite-scrolling/env.d.ts b/examples/vue/virtualized-infinite-scrolling/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/virtualized-infinite-scrolling/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/virtualized-infinite-scrolling/index.html b/examples/vue/virtualized-infinite-scrolling/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/virtualized-infinite-scrolling/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/virtualized-infinite-scrolling/package.json b/examples/vue/virtualized-infinite-scrolling/package.json new file mode 100644 index 0000000000..cd0362f29f --- /dev/null +++ b/examples/vue/virtualized-infinite-scrolling/package.json @@ -0,0 +1,28 @@ +{ + "name": "tanstack-table-example-vue-virtualized-infinite-scrolling", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-query": "^5.99.0", + "@tanstack/vue-store": "^0.11.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "@tanstack/vue-virtual": "^3.13.24", + "vue": "^3.5.32" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/virtualized-infinite-scrolling/src/App.vue b/examples/vue/virtualized-infinite-scrolling/src/App.vue new file mode 100644 index 0000000000..c33155864c --- /dev/null +++ b/examples/vue/virtualized-infinite-scrolling/src/App.vue @@ -0,0 +1,250 @@ + + + diff --git a/examples/vue/virtualized-infinite-scrolling/src/env.d.ts b/examples/vue/virtualized-infinite-scrolling/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/virtualized-infinite-scrolling/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/virtualized-infinite-scrolling/src/index.css b/examples/vue/virtualized-infinite-scrolling/src/index.css new file mode 100644 index 0000000000..6402cb4b8b --- /dev/null +++ b/examples/vue/virtualized-infinite-scrolling/src/index.css @@ -0,0 +1,40 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border-collapse: collapse; + border-spacing: 0; + font-family: arial, sans-serif; + table-layout: fixed; +} + +thead { + background: lightgray; +} + +tr { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; + text-align: left; +} + +td { + padding: 6px; +} + +.container { + border: 1px solid lightgray; + margin: 1rem auto; +} + +.app { + margin: 1rem auto; + text-align: center; +} diff --git a/examples/vue/virtualized-infinite-scrolling/src/main.ts b/examples/vue/virtualized-infinite-scrolling/src/main.ts new file mode 100644 index 0000000000..db4e75087b --- /dev/null +++ b/examples/vue/virtualized-infinite-scrolling/src/main.ts @@ -0,0 +1,8 @@ +import { QueryClient, VueQueryPlugin } from '@tanstack/vue-query' +import { createApp } from 'vue' +import App from './App.vue' +import './index.css' + +const queryClient = new QueryClient() + +createApp(App).use(VueQueryPlugin, { queryClient }).mount('#app') diff --git a/examples/vue/virtualized-infinite-scrolling/src/makeData.ts b/examples/vue/virtualized-infinite-scrolling/src/makeData.ts new file mode 100644 index 0000000000..4eadc7519e --- /dev/null +++ b/examples/vue/virtualized-infinite-scrolling/src/makeData.ts @@ -0,0 +1,89 @@ +import { faker } from '@faker-js/faker' +import type { SortingState } from '@tanstack/vue-table' + +export type Person = { + id: number + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + createdAt: Date +} + +export type PersonApiResponse = { + data: Array + meta: { + totalRowCount: number + } +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (index: number): Person => { + return { + id: index + 1, + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + createdAt: faker.date.anytime(), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0], + } +} + +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth] + return range(len).map((d): Person => { + return { + ...newPerson(d), + } + }) + } + + return makeDataLevel() +} + +const data = makeData(1000) + +// simulates a backend api +export const fetchData = async ( + start: number, + size: number, + sorting: SortingState, +) => { + const dbData = [...data] + if (sorting.length) { + const sort = sorting[0] + const { id, desc } = sort as { id: keyof Person; desc: boolean } + dbData.sort((a, b) => { + if (desc) { + return a[id] < b[id] ? 1 : -1 + } + return a[id] > b[id] ? 1 : -1 + }) + } + + // simulate a backend api + await new Promise((resolve) => setTimeout(resolve, 200)) + + return { + data: dbData.slice(start, start + size), + meta: { + totalRowCount: dbData.length, + }, + } +} diff --git a/examples/vue/virtualized-infinite-scrolling/tsconfig.json b/examples/vue/virtualized-infinite-scrolling/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/virtualized-infinite-scrolling/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/virtualized-infinite-scrolling/vite.config.ts b/examples/vue/virtualized-infinite-scrolling/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/virtualized-infinite-scrolling/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/virtualized-rows/package.json b/examples/vue/virtualized-rows/package.json index 0d2e703c6b..3602a5f2b3 100644 --- a/examples/vue/virtualized-rows/package.json +++ b/examples/vue/virtualized-rows/package.json @@ -6,17 +6,19 @@ "dev": "vite", "build": "vite build", "preview": "vite preview", + "lint": "eslint ./src", "test:types": "vue-tsc" }, "dependencies": { + "@faker-js/faker": "^10.4.0", "@tanstack/vue-table": "^9.0.0-alpha.33", "@tanstack/vue-virtual": "^3.13.24", "vue": "^3.5.32" }, "devDependencies": { - "@faker-js/faker": "^10.4.0", "@types/node": "^25.6.0", "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "6.0.3", "vite": "^8.0.8", "vue-tsc": "^3.2.6" diff --git a/examples/vue/virtualized-rows/src/index.css b/examples/vue/virtualized-rows/src/index.css index f243855583..6402cb4b8b 100644 --- a/examples/vue/virtualized-rows/src/index.css +++ b/examples/vue/virtualized-rows/src/index.css @@ -34,17 +34,7 @@ td { margin: 1rem auto; } -.cursor-pointer { - cursor: pointer; -} - -.select-none { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.text-left { - text-align: left; +.app { + margin: 1rem auto; + text-align: center; } diff --git a/examples/vue/virtualized-rows/src/makeData.ts b/examples/vue/virtualized-rows/src/makeData.ts index e5695467f5..aa621f5bba 100644 --- a/examples/vue/virtualized-rows/src/makeData.ts +++ b/examples/vue/virtualized-rows/src/makeData.ts @@ -12,39 +12,30 @@ export type Person = { } const range = (len: number) => { - const arr: number[] = [] - for (let i = 0; i < len; i++) { - arr.push(i) - } + const arr: Array = [] + for (let i = 0; i < len; i++) arr.push(i) return arr } -const newPerson = (index: number): Person => { - return { - id: index + 1, - firstName: faker.person.firstName(), - lastName: faker.person.lastName(), - age: faker.number.int(40), - visits: faker.number.int(1000), - progress: faker.number.int(100), - createdAt: faker.date.anytime(), - status: faker.helpers.shuffle([ - 'relationship', - 'complicated', - 'single', - ])[0]!, - } -} +const newPerson = (index: number): Person => ({ + id: index + 1, + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + createdAt: faker.date.anytime(), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0]!, +}) -export function makeData(...lens: number[]) { - const makeDataLevel = (depth = 0): Person[] => { +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { const len = lens[depth]! - return range(len).map((d): Person => { - return { - ...newPerson(d), - } - }) + return range(len).map((d): Person => ({ ...newPerson(d) })) } - return makeDataLevel() } diff --git a/examples/vue/virtualized-rows/tsconfig.json b/examples/vue/virtualized-rows/tsconfig.json index 0b8e08b465..84f3f40987 100644 --- a/examples/vue/virtualized-rows/tsconfig.json +++ b/examples/vue/virtualized-rows/tsconfig.json @@ -13,6 +13,7 @@ "isolatedModules": true, "noEmit": true, "jsx": "preserve", + "jsxImportSource": "vue", /* Linting */ "strict": true, diff --git a/examples/vue/virtualized-rows/vite.config.ts b/examples/vue/virtualized-rows/vite.config.ts index 05c17402a4..3dec1c870d 100644 --- a/examples/vue/virtualized-rows/vite.config.ts +++ b/examples/vue/virtualized-rows/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' -// https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], + plugins: [vue(), vueJsx()], }) diff --git a/examples/vue/with-tanstack-form/README.md b/examples/vue/with-tanstack-form/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/with-tanstack-form/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/with-tanstack-form/env.d.ts b/examples/vue/with-tanstack-form/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/with-tanstack-form/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/with-tanstack-form/index.html b/examples/vue/with-tanstack-form/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/with-tanstack-form/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/with-tanstack-form/package.json b/examples/vue/with-tanstack-form/package.json new file mode 100644 index 0000000000..25dff4d397 --- /dev/null +++ b/examples/vue/with-tanstack-form/package.json @@ -0,0 +1,27 @@ +{ + "name": "tanstack-table-example-vue-with-tanstack-form", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-form": "^1.29.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "vue": "^3.5.32", + "zod": "^4.3.6" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/with-tanstack-form/src/App.vue b/examples/vue/with-tanstack-form/src/App.vue new file mode 100644 index 0000000000..3d6c07bb16 --- /dev/null +++ b/examples/vue/with-tanstack-form/src/App.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/examples/vue/with-tanstack-form/src/env.d.ts b/examples/vue/with-tanstack-form/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/with-tanstack-form/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/with-tanstack-form/src/index.css b/examples/vue/with-tanstack-form/src/index.css new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/vue/with-tanstack-form/src/index.css @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/with-tanstack-form/src/main.ts b/examples/vue/with-tanstack-form/src/main.ts new file mode 100644 index 0000000000..01433bca2a --- /dev/null +++ b/examples/vue/with-tanstack-form/src/main.ts @@ -0,0 +1,4 @@ +import { createApp } from 'vue' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/examples/vue/with-tanstack-form/src/makeData.ts b/examples/vue/with-tanstack-form/src/makeData.ts new file mode 100644 index 0000000000..b9055b2d8c --- /dev/null +++ b/examples/vue/with-tanstack-form/src/makeData.ts @@ -0,0 +1,48 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0], + } +} + +export function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth] + return range(len).map((_d): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + + return makeDataLevel() +} diff --git a/examples/vue/with-tanstack-form/tsconfig.json b/examples/vue/with-tanstack-form/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/with-tanstack-form/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/with-tanstack-form/vite.config.ts b/examples/vue/with-tanstack-form/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/with-tanstack-form/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/examples/vue/pagination-controlled/.gitignore b/examples/vue/with-tanstack-query/.gitignore similarity index 100% rename from examples/vue/pagination-controlled/.gitignore rename to examples/vue/with-tanstack-query/.gitignore diff --git a/examples/vue/with-tanstack-query/README.md b/examples/vue/with-tanstack-query/README.md new file mode 100644 index 0000000000..3ac3f1a9b4 --- /dev/null +++ b/examples/vue/with-tanstack-query/README.md @@ -0,0 +1,6 @@ +# Example + +To run this example: + +- `npm install` or `yarn` +- `npm run dev` or `yarn dev` diff --git a/examples/vue/with-tanstack-query/env.d.ts b/examples/vue/with-tanstack-query/env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/examples/vue/with-tanstack-query/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/vue/with-tanstack-query/index.html b/examples/vue/with-tanstack-query/index.html new file mode 100644 index 0000000000..e160e46247 --- /dev/null +++ b/examples/vue/with-tanstack-query/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + +
+ + + diff --git a/examples/vue/with-tanstack-query/package.json b/examples/vue/with-tanstack-query/package.json new file mode 100644 index 0000000000..07f45c0ec1 --- /dev/null +++ b/examples/vue/with-tanstack-query/package.json @@ -0,0 +1,27 @@ +{ + "name": "tanstack-table-example-vue-with-tanstack-query", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ./src", + "test:types": "vue-tsc" + }, + "dependencies": { + "@faker-js/faker": "^10.4.0", + "@tanstack/vue-query": "^5.99.0", + "@tanstack/vue-store": "^0.11.0", + "@tanstack/vue-table": "^9.0.0-alpha.33", + "vue": "^3.5.32" + }, + "devDependencies": { + "@types/node": "^25.6.0", + "@vitejs/plugin-vue": "^6.0.6", + "@vitejs/plugin-vue-jsx": "^5.1.5", + "typescript": "6.0.3", + "vite": "^8.0.8", + "vue-tsc": "^3.2.6" + } +} diff --git a/examples/vue/with-tanstack-query/src/App.tsx b/examples/vue/with-tanstack-query/src/App.tsx new file mode 100644 index 0000000000..f9af98d279 --- /dev/null +++ b/examples/vue/with-tanstack-query/src/App.tsx @@ -0,0 +1,199 @@ +import { computed, defineComponent, ref, watchEffect } from 'vue' +import { createAtom, useSelector } from '@tanstack/vue-store' +import { keepPreviousData, useQuery } from '@tanstack/vue-query' +import { + FlexRender, + createColumnHelper, + rowPaginationFeature, + tableFeatures, + useTable, +} from '@tanstack/vue-table' +import { fetchData } from './fetchData' +import type { Person } from './fetchData' +import type { Cell, Header, HeaderGroup, Row } from '@tanstack/vue-table' + +const _features = tableFeatures({ + rowPaginationFeature, +}) + +const columnHelper = createColumnHelper() + +const columns = columnHelper.columns([ + columnHelper.accessor('firstName', { + header: 'First Name', + cell: (info) => info.getValue(), + }), + columnHelper.accessor('lastName', { + header: 'Last Name', + cell: (info) => info.getValue(), + }), + columnHelper.accessor('age', { + header: 'Age', + }), + columnHelper.accessor('visits', { + header: 'Visits', + }), + columnHelper.accessor('status', { + header: 'Status', + }), + columnHelper.accessor('progress', { + header: 'Profile Progress', + }), +]) + +const paginationAtom = createAtom({ + pageIndex: 0, + pageSize: 10, +}) + +export default defineComponent({ + name: 'WithTanStackQueryExample', + setup() { + const pagination = useSelector(paginationAtom) + const defaultData: Array = [] + + const dataQuery = useQuery(() => ({ + queryKey: ['data', pagination.value], + queryFn: () => fetchData(pagination.value), + placeholderData: keepPreviousData, + })) + + const tableData = computed>( + () => dataQuery.data.value?.rows ?? defaultData, + ) + + const rowCount = ref(0) + + watchEffect(() => { + const nextRowCount = dataQuery.data.value?.rowCount + if (nextRowCount != null) { + rowCount.value = nextRowCount + } + }) + + const table = useTable({ + _features, + _rowModels: {}, + columns, + data: tableData, + rowCount, + atoms: { + pagination: paginationAtom, + }, + manualPagination: true, + debugTable: true, + }) + + return () => ( +
+
+ + + {table + .getHeaderGroups() + .map((headerGroup: HeaderGroup) => ( + + {headerGroup.headers.map( + (header: Header) => ( + + ), + )} + + ))} + + + {table + .getRowModel() + .rows.map((row: Row) => ( + + {row + .getAllCells() + .map((cell: Cell) => ( + + ))} + + ))} + +
+ {header.isPlaceholder ? null : ( + + )} +
+ +
+
+
+ + + + + +
Page
+ + {pagination.value.pageIndex + 1} of{' '} + {table.getPageCount().toLocaleString()} + +
+ + | Go to page: + { + const target = event.currentTarget as HTMLInputElement + const page = target.value ? Number(target.value) - 1 : 0 + table.setPageIndex(page) + }} + class="border p-1 rounded w-16" + /> + + + {dataQuery.isFetching.value ? 'Loading...' : null} +
+
+ Showing {table.getRowModel().rows.length.toLocaleString()} of{' '} + {dataQuery.data.value?.rowCount.toLocaleString()} Rows +
+
{JSON.stringify({ pagination: pagination.value }, null, 2)}
+
+ ) + }, +}) diff --git a/examples/vue/with-tanstack-query/src/App.vue b/examples/vue/with-tanstack-query/src/App.vue new file mode 100644 index 0000000000..4256c2000a --- /dev/null +++ b/examples/vue/with-tanstack-query/src/App.vue @@ -0,0 +1,7 @@ + + + diff --git a/examples/vue/with-tanstack-query/src/env.d.ts b/examples/vue/with-tanstack-query/src/env.d.ts new file mode 100644 index 0000000000..f5e6ee3b3c --- /dev/null +++ b/examples/vue/with-tanstack-query/src/env.d.ts @@ -0,0 +1,8 @@ +/// + +declare module '*.vue' { + import type { DefineComponent } from 'vue' + // eslint-disable-next-line @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/examples/vue/with-tanstack-query/src/fetchData.ts b/examples/vue/with-tanstack-query/src/fetchData.ts new file mode 100644 index 0000000000..0ad745b375 --- /dev/null +++ b/examples/vue/with-tanstack-query/src/fetchData.ts @@ -0,0 +1,66 @@ +import { faker } from '@faker-js/faker' + +export type Person = { + firstName: string + lastName: string + age: number + visits: number + progress: number + status: 'relationship' | 'complicated' | 'single' + subRows?: Array +} + +const range = (len: number) => { + const arr: Array = [] + for (let i = 0; i < len; i++) { + arr.push(i) + } + return arr +} + +const newPerson = (): Person => { + return { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + age: faker.number.int(40), + visits: faker.number.int(1000), + progress: faker.number.int(100), + status: faker.helpers.shuffle([ + 'relationship', + 'complicated', + 'single', + ])[0], + } +} + +function makeData(...lens: Array) { + const makeDataLevel = (depth = 0): Array => { + const len = lens[depth] + return range(len).map((): Person => { + return { + ...newPerson(), + subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined, + } + }) + } + + return makeDataLevel() +} + +const data = makeData(10000) + +export async function fetchData(options: { + pageIndex: number + pageSize: number +}) { + await new Promise((resolve) => setTimeout(resolve, 500)) + + return { + rows: data.slice( + options.pageIndex * options.pageSize, + (options.pageIndex + 1) * options.pageSize, + ), + pageCount: Math.ceil(data.length / options.pageSize), + rowCount: data.length, + } +} diff --git a/examples/vue/with-tanstack-query/src/index.css b/examples/vue/with-tanstack-query/src/index.css new file mode 100644 index 0000000000..43c09e0f6b --- /dev/null +++ b/examples/vue/with-tanstack-query/src/index.css @@ -0,0 +1,26 @@ +html { + font-family: sans-serif; + font-size: 14px; +} + +table { + border: 1px solid lightgray; +} + +tbody { + border-bottom: 1px solid lightgray; +} + +th { + border-bottom: 1px solid lightgray; + border-right: 1px solid lightgray; + padding: 2px 4px; +} + +tfoot { + color: gray; +} + +tfoot th { + font-weight: normal; +} diff --git a/examples/vue/with-tanstack-query/src/main.ts b/examples/vue/with-tanstack-query/src/main.ts new file mode 100644 index 0000000000..f7a2be5add --- /dev/null +++ b/examples/vue/with-tanstack-query/src/main.ts @@ -0,0 +1,8 @@ +import { createApp } from 'vue' +import { QueryClient, VueQueryPlugin } from '@tanstack/vue-query' +import App from './App.vue' +import './index.css' + +const queryClient = new QueryClient() + +createApp(App).use(VueQueryPlugin, { queryClient }).mount('#app') diff --git a/examples/vue/pagination-controlled/src/useService.ts b/examples/vue/with-tanstack-query/src/useService.ts similarity index 100% rename from examples/vue/pagination-controlled/src/useService.ts rename to examples/vue/with-tanstack-query/src/useService.ts diff --git a/examples/vue/with-tanstack-query/tsconfig.json b/examples/vue/with-tanstack-query/tsconfig.json new file mode 100644 index 0000000000..84f3f40987 --- /dev/null +++ b/examples/vue/with-tanstack-query/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "vue", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] +} diff --git a/examples/vue/with-tanstack-query/vite.config.ts b/examples/vue/with-tanstack-query/vite.config.ts new file mode 100644 index 0000000000..3dec1c870d --- /dev/null +++ b/examples/vue/with-tanstack-query/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import vueJsx from '@vitejs/plugin-vue-jsx' + +export default defineConfig({ + plugins: [vue(), vueJsx()], +}) diff --git a/knip.json b/knip.json index c5f605d3d8..c75c2ffd71 100644 --- a/knip.json +++ b/knip.json @@ -1,13 +1,19 @@ { "$schema": "https://unpkg.com/knip@5/schema.json", "ignoreWorkspaces": ["examples/**"], - "ignore": ["**/*benchmark*", "**/benchmarks/**", ".agents/**"], + "ignore": ["**/*benchmark*", "**/benchmarks/**"], "workspaces": { "packages/table-core": { "ignore": ["**/tests/**"] }, "packages/match-sorter-utils": { "ignoreDependencies": ["remove-accents"] + }, + "packages/angular-table": { + "entry": ["src/index.ts!", "static-functions/index.ts!"] + }, + "packages/svelte-table": { + "entry": ["src/index.ts!", "src/static-functions.ts!"] } } } diff --git a/packages/angular-table/package.json b/packages/angular-table/package.json index 233bd82d9a..b88da25fa5 100644 --- a/packages/angular-table/package.json +++ b/packages/angular-table/package.json @@ -28,6 +28,10 @@ "types": "./dist/types/tanstack-angular-table.d.ts", "default": "./dist/fesm2022/tanstack-angular-table.mjs" }, + "./static-functions": { + "types": "./dist/types/tanstack-angular-table-static-functions.d.ts", + "default": "./dist/fesm2022/tanstack-angular-table-static-functions.mjs" + }, "./package.json": { "default": "./package.json" } @@ -37,7 +41,8 @@ }, "files": [ "dist", - "src" + "src", + "static-functions" ], "scripts": { "build": "ng-packagr -p ng-package.json -c tsconfig.build.json && rimraf ./dist/package.json", diff --git a/packages/angular-table/static-functions/index.ts b/packages/angular-table/static-functions/index.ts new file mode 100644 index 0000000000..e0cb951593 --- /dev/null +++ b/packages/angular-table/static-functions/index.ts @@ -0,0 +1 @@ +export * from '@tanstack/table-core/static-functions' diff --git a/packages/angular-table/static-functions/ng-package.json b/packages/angular-table/static-functions/ng-package.json new file mode 100644 index 0000000000..cff8cfa137 --- /dev/null +++ b/packages/angular-table/static-functions/ng-package.json @@ -0,0 +1,6 @@ +{ + "$schema": "../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "index.ts" + } +} diff --git a/packages/lit-table/package.json b/packages/lit-table/package.json index 66caf9c5c1..ce5afc4938 100644 --- a/packages/lit-table/package.json +++ b/packages/lit-table/package.json @@ -29,6 +29,10 @@ "import": "./dist/index.js", "require": "./dist/index.cjs" }, + "./static-functions": { + "import": "./dist/static-functions.js", + "require": "./dist/static-functions.cjs" + }, "./package.json": "./package.json" }, "sideEffects": false, diff --git a/packages/lit-table/src/static-functions.ts b/packages/lit-table/src/static-functions.ts new file mode 100644 index 0000000000..e0cb951593 --- /dev/null +++ b/packages/lit-table/src/static-functions.ts @@ -0,0 +1 @@ +export * from '@tanstack/table-core/static-functions' diff --git a/packages/lit-table/tsdown.config.ts b/packages/lit-table/tsdown.config.ts index 71071cb903..4a5ae4c85a 100644 --- a/packages/lit-table/tsdown.config.ts +++ b/packages/lit-table/tsdown.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'tsdown' export default defineConfig({ - entry: ['./src/index.ts'], + entry: ['./src/index.ts', './src/static-functions.ts'], format: ['esm', 'cjs'], unbundle: true, dts: true, diff --git a/packages/preact-table/package.json b/packages/preact-table/package.json index 84ff7389e1..9ec6b3e8ae 100644 --- a/packages/preact-table/package.json +++ b/packages/preact-table/package.json @@ -29,6 +29,10 @@ "import": "./dist/index.js", "require": "./dist/index.cjs" }, + "./static-functions": { + "import": "./dist/static-functions.js", + "require": "./dist/static-functions.cjs" + }, "./package.json": "./package.json" }, "sideEffects": false, diff --git a/packages/preact-table/src/Subscribe.ts b/packages/preact-table/src/Subscribe.ts index 5a41cc733c..20ab0b3261 100644 --- a/packages/preact-table/src/Subscribe.ts +++ b/packages/preact-table/src/Subscribe.ts @@ -1,4 +1,4 @@ -import { useSelector } from '@tanstack/preact-store' +import { shallow, useSelector } from '@tanstack/preact-store' import type { NoInfer, RowData, @@ -59,7 +59,9 @@ export function Subscribe< TData extends RowData, TSelected = {}, >(props: SubscribeProps): ComponentChildren { - const selected = useSelector(props.table.store, props.selector) + const selected = useSelector(props.table.store, props.selector, { + compare: shallow, + }) return typeof props.children === 'function' ? props.children(selected) diff --git a/packages/preact-table/src/static-functions.ts b/packages/preact-table/src/static-functions.ts new file mode 100644 index 0000000000..e0cb951593 --- /dev/null +++ b/packages/preact-table/src/static-functions.ts @@ -0,0 +1 @@ +export * from '@tanstack/table-core/static-functions' diff --git a/packages/preact-table/tsdown.config.ts b/packages/preact-table/tsdown.config.ts index 71071cb903..4a5ae4c85a 100644 --- a/packages/preact-table/tsdown.config.ts +++ b/packages/preact-table/tsdown.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'tsdown' export default defineConfig({ - entry: ['./src/index.ts'], + entry: ['./src/index.ts', './src/static-functions.ts'], format: ['esm', 'cjs'], unbundle: true, dts: true, diff --git a/packages/react-table/package.json b/packages/react-table/package.json index 2d78fa42ea..8d41b89a8a 100644 --- a/packages/react-table/package.json +++ b/packages/react-table/package.json @@ -33,6 +33,10 @@ "import": "./dist/legacy.js", "require": "./dist/legacy.cjs" }, + "./static-functions": { + "import": "./dist/static-functions.js", + "require": "./dist/static-functions.cjs" + }, "./package.json": "./package.json" }, "sideEffects": false, diff --git a/packages/react-table/src/static-functions.ts b/packages/react-table/src/static-functions.ts new file mode 100644 index 0000000000..e0cb951593 --- /dev/null +++ b/packages/react-table/src/static-functions.ts @@ -0,0 +1 @@ +export * from '@tanstack/table-core/static-functions' diff --git a/packages/react-table/tsdown.config.ts b/packages/react-table/tsdown.config.ts index 2158066c5c..939f5b0f50 100644 --- a/packages/react-table/tsdown.config.ts +++ b/packages/react-table/tsdown.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'tsdown' export default defineConfig({ - entry: ['./src/index.ts', './src/legacy.ts'], + entry: ['./src/index.ts', './src/legacy.ts', './src/static-functions.ts'], format: ['esm', 'cjs'], unbundle: true, dts: true, diff --git a/packages/solid-table/package.json b/packages/solid-table/package.json index e712b01413..e6ab189772 100644 --- a/packages/solid-table/package.json +++ b/packages/solid-table/package.json @@ -29,6 +29,11 @@ "import": "./dist/index.js", "require": "./dist/index.cjs" }, + "./static-functions": { + "solid": "./dist/static-functions.js", + "import": "./dist/static-functions.js", + "require": "./dist/static-functions.cjs" + }, "./package.json": "./package.json" }, "sideEffects": false, diff --git a/packages/solid-table/src/createTable.ts b/packages/solid-table/src/createTable.ts index 6b2d401f4d..7c57e1b96c 100644 --- a/packages/solid-table/src/createTable.ts +++ b/packages/solid-table/src/createTable.ts @@ -3,7 +3,7 @@ import { constructTable, } from '@tanstack/table-core' import { useSelector } from '@tanstack/solid-store' -import { createComputed, createSignal, mergeProps } from 'solid-js' +import { createComputed, createSignal, mergeProps, untrack } from 'solid-js' import type { Accessor, JSX } from 'solid-js' import type { NoInfer, @@ -92,15 +92,24 @@ export function createTable< const allOptions = useSelector(table.optionsStore) createComputed(() => { - table.setOptions((prev) => { - return mergeProps(prev, mergedOptions) as TableOptions + const userState = tableOptions.state + if (userState) { + for (const key in userState) { + void (userState as Record)[key] + } + } + + untrack(() => { + table.setOptions((prev) => { + return mergeProps(prev, mergedOptions) as TableOptions + }) }) }) createComputed(() => { allState() allOptions() - setNotifier(void 0) + untrack(() => setNotifier(void 0)) }) table.Subscribe = function Subscribe(props: { diff --git a/packages/solid-table/src/static-functions.ts b/packages/solid-table/src/static-functions.ts new file mode 100644 index 0000000000..e0cb951593 --- /dev/null +++ b/packages/solid-table/src/static-functions.ts @@ -0,0 +1 @@ +export * from '@tanstack/table-core/static-functions' diff --git a/packages/solid-table/tsdown.config.ts b/packages/solid-table/tsdown.config.ts index 9a68445538..f42f2f063f 100644 --- a/packages/solid-table/tsdown.config.ts +++ b/packages/solid-table/tsdown.config.ts @@ -3,7 +3,7 @@ import solid from 'vite-plugin-solid' export default defineConfig({ plugins: [solid()], - entry: ['./src/index.tsx'], + entry: ['./src/index.tsx', './src/static-functions.ts'], format: ['esm', 'cjs'], unbundle: true, dts: true, diff --git a/packages/svelte-table/package.json b/packages/svelte-table/package.json index bc323c0c02..7b64266d9c 100644 --- a/packages/svelte-table/package.json +++ b/packages/svelte-table/package.json @@ -30,6 +30,11 @@ "svelte": "./dist/index.js", "import": "./dist/index.js" }, + "./static-functions": { + "types": "./dist/static-functions.d.ts", + "svelte": "./dist/static-functions.js", + "import": "./dist/static-functions.js" + }, "./package.json": "./package.json" }, "engines": { diff --git a/packages/svelte-table/src/static-functions.ts b/packages/svelte-table/src/static-functions.ts new file mode 100644 index 0000000000..e0cb951593 --- /dev/null +++ b/packages/svelte-table/src/static-functions.ts @@ -0,0 +1 @@ +export * from '@tanstack/table-core/static-functions' diff --git a/packages/table-core/package.json b/packages/table-core/package.json index 1d9789b002..c2282692f3 100644 --- a/packages/table-core/package.json +++ b/packages/table-core/package.json @@ -34,6 +34,10 @@ "import": "./dist/index.js", "require": "./dist/index.cjs" }, + "./static-functions": { + "import": "./dist/static-functions.js", + "require": "./dist/static-functions.cjs" + }, "./package.json": "./package.json" }, "sideEffects": false, diff --git a/packages/table-core/src/core/columns/coreColumnsFeature.ts b/packages/table-core/src/core/columns/coreColumnsFeature.ts index a9b6e0a2d5..2a8c5eb4d1 100644 --- a/packages/table-core/src/core/columns/coreColumnsFeature.ts +++ b/packages/table-core/src/core/columns/coreColumnsFeature.ts @@ -40,8 +40,8 @@ export function constructCoreColumnsFeature< column_getLeafColumns: { fn: (column) => column_getLeafColumns(column), memoDeps: (column) => [ - column.table.store.state.columnOrder, - column.table.store.state.grouping, + column.table.atoms.columnOrder.get(), + column.table.atoms.grouping.get(), column.table.options.columns, column.table.options.groupedColumnMode, ], @@ -70,8 +70,8 @@ export function constructCoreColumnsFeature< table_getAllLeafColumns: { fn: () => table_getAllLeafColumns(table), memoDeps: () => [ - table.store.state.columnOrder, - table.store.state.grouping, + table.atoms.columnOrder.get(), + table.atoms.grouping.get(), table.options.columns, table.options.groupedColumnMode, ], diff --git a/packages/table-core/src/core/headers/coreHeadersFeature.ts b/packages/table-core/src/core/headers/coreHeadersFeature.ts index 1a74b7a4bf..ea0fdcbd5f 100644 --- a/packages/table-core/src/core/headers/coreHeadersFeature.ts +++ b/packages/table-core/src/core/headers/coreHeadersFeature.ts @@ -52,10 +52,10 @@ export function constructCoreHeadersFeature< fn: () => table_getHeaderGroups(table), memoDeps: () => [ table.options.columns, - table.store.state.columnOrder, - table.store.state.grouping, - table.store.state.columnPinning, - table.store.state.columnVisibility, + table.atoms.columnOrder.get(), + table.atoms.grouping.get(), + table.atoms.columnPinning.get(), + table.atoms.columnVisibility.get(), table.options.groupedColumnMode, ], }, diff --git a/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts b/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts index 4f576515ae..e8d8aa271d 100644 --- a/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts +++ b/packages/table-core/src/core/headers/coreHeadersFeature.utils.ts @@ -50,7 +50,7 @@ export function table_getHeaderGroups< TData extends RowData, >(table: Table_Internal) { const { left, right } = - table.store.state.columnPinning ?? getDefaultColumnPinningState() + table.atoms.columnPinning.get() ?? getDefaultColumnPinningState() const allColumns = table.getAllColumns() const leafColumns = callMemoOrStaticFn( table, diff --git a/packages/table-core/src/core/table/constructTable.ts b/packages/table-core/src/core/table/constructTable.ts index 7240048904..0fafde914c 100644 --- a/packages/table-core/src/core/table/constructTable.ts +++ b/packages/table-core/src/core/table/constructTable.ts @@ -1,6 +1,6 @@ -import { createStore } from '@tanstack/store' +import { createAtom, createStore } from '@tanstack/store' import { coreFeatures } from '../coreFeatures' -import type { Store } from '@tanstack/store' +import type { Atom } from '@tanstack/store' import type { RowData } from '../../types/type-utils' import type { TableFeature, TableFeatures } from '../../types/TableFeatures' import type { Table, Table_Internal } from '../../types/Table' @@ -19,13 +19,6 @@ export function getInitialTableState( return structuredClone(initialState) as TableState } -export function createTableStore( - features: TFeatures, - initialState: Partial> | undefined = {}, -): Store> { - return createStore(getInitialTableState(features, initialState)) -} - export function constructTable< TFeatures extends TableFeatures, TData extends RowData, @@ -58,15 +51,76 @@ export function constructTable< table.options.initialState, ) - table.baseStore = table.options.store ?? createStore(table.initialState) + const stateKeys = Object.keys(table.initialState) as Array< + keyof TableState + > + + const baseAtomsMap: Record> = {} + const atomsMap: Record> = {} + + const makeDerivedAtom = (key: string) => + createAtom(() => { + // Reading optionsStore.state keeps precedence reactive to setOptions. + const opts = table.optionsStore.state + const externalAtom = ( + opts.atoms as Record> | undefined + )?.[key] + if (externalAtom) { + return externalAtom.get() + } + const externalState = ( + opts.state as Record | undefined + )?.[key] + if (externalState !== undefined) { + return externalState + } + // Accessing through the proxy lazily creates the base atom if missing. + return baseAtomsProxy[key]!.get() + }) as unknown as Atom + + for (const key of stateKeys) { + baseAtomsMap[key as string] = createAtom( + table.initialState[key], + ) as unknown as Atom + } + + const baseAtomsProxy = new Proxy(baseAtomsMap, { + get(target, prop) { + if (typeof prop !== 'string') return (target as any)[prop] + if (!(prop in target)) { + target[prop] = createAtom(undefined) as unknown as Atom + } + return target[prop] + }, + }) + + // Pre-build derived atoms for known keys so the initial store snapshot is + // stable and subscriptions wire up eagerly. Unknown keys get a derived atom + // lazily via the proxy below. + for (const key of stateKeys) { + atomsMap[key as string] = makeDerivedAtom(key as string) + } + + const atomsProxy = new Proxy(atomsMap, { + get(target, prop) { + if (typeof prop !== 'string') return (target as any)[prop] + if (!(prop in target)) { + target[prop] = makeDerivedAtom(prop) + } + return target[prop] + }, + }) + + table.baseAtoms = baseAtomsProxy as unknown as typeof table.baseAtoms + table.atoms = atomsProxy as unknown as typeof table.atoms table.store = createStore(() => { - const state = table.baseStore.state - return { - ...state, - ...(table.optionsStore.state.state ?? {}), + const snapshot = {} as TableState + for (const key of stateKeys) { + ;(snapshot as any)[key] = atomsProxy[key as string]!.get() } - }) + return snapshot + }) as typeof table.store if ( process.env.NODE_ENV === 'development' && diff --git a/packages/table-core/src/core/table/coreTablesFeature.types.ts b/packages/table-core/src/core/table/coreTablesFeature.types.ts index 513a636311..b9641b4a83 100644 --- a/packages/table-core/src/core/table/coreTablesFeature.types.ts +++ b/packages/table-core/src/core/table/coreTablesFeature.types.ts @@ -1,17 +1,64 @@ -import type { ReadonlyStore, Store } from '@tanstack/store' +import type { Atom, ReadonlyAtom, ReadonlyStore, Store } from '@tanstack/store' import type { CoreFeatures } from '../coreFeatures' import type { RowModelFns } from '../../types/RowModelFns' import type { RowData, Updater } from '../../types/type-utils' import type { TableFeatures } from '../../types/TableFeatures' import type { CachedRowModels, CreateRowModels_All } from '../../types/RowModel' import type { TableOptions } from '../../types/TableOptions' -import type { TableState } from '../../types/TableState' +import type { TableState, TableState_All } from '../../types/TableState' export interface TableMeta< TFeatures extends TableFeatures, TData extends RowData, > {} +/** + * A map of writable atoms, one per `TableState` slice. These are the internal + * writable atoms that the library always writes to via `makeStateUpdater`. + */ +export type BaseAtoms = { + [K in keyof TableState]-?: Atom[K]> +} + +/** + * A map of readonly derived atoms, one per `TableState` slice. Each derives + * from its corresponding `baseAtom` plus, optionally, a per-slice external + * atom or external state value. + * + * Precedence: `options.atoms[key]` > `options.state[key]` > `baseAtoms[key]`. + */ +export type Atoms = { + [K in keyof TableState]-?: ReadonlyAtom[K]> +} + +/** + * A map of optional external atoms, one per `TableState` slice. Consumers can + * provide their own writable atom for any state slice to take over ownership + * of that slice. + */ +export type ExternalAtoms = Partial<{ + [K in keyof TableState]: Atom[K]> +}> + +/** + * Internal "all features" flat variants of the atom types. `Table_Internal` + * uses these so feature code (written generically over `TFeatures`) can access + * any slice atom (e.g. `table.atoms.columnPinning`) without TypeScript + * narrowing away slices that aren't in the current `TFeatures` union. + * + * This mirrors the pre-refactor pattern where `Table_Internal` overrode + * `store: ReadonlyStore` for the same reason. + */ +export type BaseAtoms_All = { + [K in keyof TableState_All]-?: Atom +} +export type Atoms_All = { + [K in keyof TableState_All]-?: ReadonlyAtom +} +export type ExternalAtoms_All = Partial<{ + [K in keyof TableState_All]: Atom +}> + export interface TableOptions_Table< TFeatures extends TableFeatures, TData extends RowData, @@ -24,6 +71,14 @@ export interface TableOptions_Table< * The row model options that you want to enable for the table. */ _rowModels?: CreateRowModels_All + /** + * 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]` + * and the internal base atom for that slice. Writes originating from the library are + * still routed through the internal base atom; consumers are responsible for + * mirroring changes back to their external atom via the corresponding `onXChange` callback. + */ + atoms?: ExternalAtoms /** * Set this option to override any of the `autoReset...` feature options. */ @@ -52,10 +107,6 @@ export interface TableOptions_Table< * Pass in individual self-managed state to the table. */ state?: Partial> - /** - * Optionally, provide your own external TanStack Store instance if you want to manage the table state externally. - */ - store?: Store> } export interface Table_CoreProperties< @@ -91,9 +142,16 @@ export interface Table_CoreProperties< */ _rowPrototype?: object /** - * The base store for the table. This can be used to write to the table state. + * The internal writable atoms for each `TableState` slice. This is the library's + * single write surface — all state mutations from features land here. + */ + baseAtoms: BaseAtoms + /** + * The readonly derived atoms for each `TableState` slice. Each derives from + * its corresponding `baseAtom` plus, optionally, a per-slice external atom or + * external state value (precedence: external atom > external state > base atom). */ - baseStore: Store> + atoms: Atoms /** * The base store for the table options. */ @@ -107,7 +165,8 @@ export interface Table_CoreProperties< */ readonly options: TableOptions /** - * Where the table state is stored. + * The readonly flat store for the table state. Derives from `table.atoms` + * only; never reads external state directly. */ store: ReadonlyStore> } diff --git a/packages/table-core/src/core/table/coreTablesFeature.utils.ts b/packages/table-core/src/core/table/coreTablesFeature.utils.ts index 0afc21d63a..e79b0a8206 100644 --- a/packages/table-core/src/core/table/coreTablesFeature.utils.ts +++ b/packages/table-core/src/core/table/coreTablesFeature.utils.ts @@ -1,3 +1,4 @@ +import { batch } from '@tanstack/store' import { functionalUpdate } from '../../utils' import type { RowData, Updater } from '../../types/type-utils' import type { TableFeatures } from '../../types/TableFeatures' @@ -8,7 +9,12 @@ export function table_reset< TFeatures extends TableFeatures, TData extends RowData, >(table: Table_Internal): void { - table.baseStore.setState(() => structuredClone(table.initialState)) + const snap = structuredClone(table.initialState) + batch(() => { + for (const key of Object.keys(snap) as Array) { + ;(table.baseAtoms as any)[key].set(snap[key] as any) + } + }) } export function table_mergeOptions< diff --git a/packages/table-core/src/features/column-faceting/columnFacetingFeature.ts b/packages/table-core/src/features/column-faceting/columnFacetingFeature.ts index ea8fc9b791..8ce61a6b7a 100644 --- a/packages/table-core/src/features/column-faceting/columnFacetingFeature.ts +++ b/packages/table-core/src/features/column-faceting/columnFacetingFeature.ts @@ -39,8 +39,8 @@ export function constructColumnFacetingFeature< column_getFacetedRowModel: { memoDeps: () => [ table.getPreFilteredRowModel().rows, - table.store.state.columnFilters, - table.store.state.globalFilter, + table.atoms.columnFilters.get(), + table.atoms.globalFilter.get(), table.getFilteredRowModel().rows, ], fn: (column) => column_getFacetedRowModel(column, column.table), @@ -75,8 +75,8 @@ export function constructColumnFacetingFeature< table_getGlobalFacetedRowModel: { memoDeps: () => [ table.getPreFilteredRowModel().rows, - table.store.state.columnFilters, - table.store.state.globalFilter, + table.atoms.columnFilters.get(), + table.atoms.globalFilter.get(), table.getFilteredRowModel().rows, ], fn: () => table_getGlobalFacetedRowModel(table), diff --git a/packages/table-core/src/features/column-faceting/createFacetedRowModel.ts b/packages/table-core/src/features/column-faceting/createFacetedRowModel.ts index b0f90eb2b2..384a0c5dbb 100644 --- a/packages/table-core/src/features/column-faceting/createFacetedRowModel.ts +++ b/packages/table-core/src/features/column-faceting/createFacetedRowModel.ts @@ -25,8 +25,8 @@ export function createFacetedRowModel< fnName: 'createFacetedRowModel', memoDeps: () => [ table.getPreFilteredRowModel(), - table.store.state.columnFilters, - table.store.state.globalFilter, + table.atoms.columnFilters.get(), + table.atoms.globalFilter.get(), table.getFilteredRowModel(), ], fn: (preRowModel, columnFilters, globalFilter) => diff --git a/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts b/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts index bc37d84757..5a3101dd57 100644 --- a/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts +++ b/packages/table-core/src/features/column-filtering/columnFilteringFeature.utils.ts @@ -100,7 +100,7 @@ export function column_getFilterValue< TData extends RowData, TValue extends CellData = CellData, >(column: Column_Internal) { - return column.table.store.state.columnFilters?.find((d) => d.id === column.id) + return column.table.atoms.columnFilters.get()?.find((d) => d.id === column.id) ?.value } @@ -110,9 +110,9 @@ export function column_getFilterIndex< TValue extends CellData = CellData, >(column: Column_Internal): number { return ( - column.table.store.state.columnFilters?.findIndex( - (d) => d.id === column.id, - ) ?? -1 + column.table.atoms.columnFilters + .get() + ?.findIndex((d) => d.id === column.id) ?? -1 ) } diff --git a/packages/table-core/src/features/column-filtering/createFilteredRowModel.ts b/packages/table-core/src/features/column-filtering/createFilteredRowModel.ts index 85eb27ac4e..158a3878c3 100644 --- a/packages/table-core/src/features/column-filtering/createFilteredRowModel.ts +++ b/packages/table-core/src/features/column-filtering/createFilteredRowModel.ts @@ -34,8 +34,8 @@ export function createFilteredRowModel< fnName: 'table.getFilteredRowModel', memoDeps: () => [ table.getPreFilteredRowModel(), - table.store.state.columnFilters, - table.store.state.globalFilter, + table.atoms.columnFilters.get(), + table.atoms.globalFilter.get(), ], fn: () => _createFilteredRowModel(table), onAfterUpdate: () => table_autoResetPageIndex(table), diff --git a/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts b/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts index 3f25667903..ad818ad83b 100644 --- a/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts +++ b/packages/table-core/src/features/column-grouping/columnGroupingFeature.utils.ts @@ -48,7 +48,7 @@ export function column_getIsGrouped< TData extends RowData, TValue extends CellData = CellData, >(column: Column_Internal): boolean { - return !!column.table.store.state.grouping?.includes(column.id) + return !!column.table.atoms.grouping.get()?.includes(column.id) } export function column_getGroupedIndex< @@ -56,7 +56,7 @@ export function column_getGroupedIndex< TData extends RowData, TValue extends CellData = CellData, >(column: Column_Internal): number { - return column.table.store.state.grouping?.indexOf(column.id) ?? -1 + return column.table.atoms.grouping.get()?.indexOf(column.id) ?? -1 } export function column_getToggleGroupingHandler< diff --git a/packages/table-core/src/features/column-grouping/createGroupedRowModel.ts b/packages/table-core/src/features/column-grouping/createGroupedRowModel.ts index 27d07d8f22..2259cb795b 100644 --- a/packages/table-core/src/features/column-grouping/createGroupedRowModel.ts +++ b/packages/table-core/src/features/column-grouping/createGroupedRowModel.ts @@ -34,7 +34,7 @@ export function createGroupedRowModel< table, fnName: 'table.getGroupedRowModel', memoDeps: () => [ - table.store.state.grouping, + table.atoms.grouping.get(), table.getPreGroupedRowModel(), ], fn: () => _createGroupedRowModel(table), @@ -51,7 +51,7 @@ function _createGroupedRowModel< TData extends RowData = any, >(table: Table_Internal): RowModel { const rowModel = table.getPreGroupedRowModel() - const grouping = table.store.state.grouping + const grouping = table.atoms.grouping.get() if (!rowModel.rows.length || !grouping?.length) { rowModel.rows.forEach((row) => { diff --git a/packages/table-core/src/features/column-ordering/columnOrderingFeature.ts b/packages/table-core/src/features/column-ordering/columnOrderingFeature.ts index 0e307860e4..59225a2bd1 100644 --- a/packages/table-core/src/features/column-ordering/columnOrderingFeature.ts +++ b/packages/table-core/src/features/column-ordering/columnOrderingFeature.ts @@ -55,9 +55,9 @@ export function constructColumnOrderingFeature< fn: (column, position) => column_getIndex(column, position), memoDeps: (column, position) => [ position, - column.table.store.state.columnOrder, - column.table.store.state.columnPinning, - column.table.store.state.grouping, + column.table.atoms.columnOrder.get(), + column.table.atoms.columnPinning.get(), + column.table.atoms.grouping.get(), ], }, column_getIsFirstColumn: { @@ -80,8 +80,8 @@ export function constructColumnOrderingFeature< table_getOrderColumnsFn: { fn: () => table_getOrderColumnsFn(table), memoDeps: () => [ - table.store.state.columnOrder, - table.store.state.grouping, + table.atoms.columnOrder.get(), + table.atoms.grouping.get(), table.options.groupedColumnMode, ], }, diff --git a/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts b/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts index 9d173258fb..abeb261a07 100644 --- a/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts +++ b/packages/table-core/src/features/column-ordering/columnOrderingFeature.utils.ts @@ -110,7 +110,7 @@ export function orderColumns< table: Table_Internal, leafColumns: Array>, ) { - const grouping = table.store.state.grouping ?? ([] as GroupingState) + const grouping = table.atoms.grouping.get() ?? ([] as GroupingState) const { groupedColumnMode } = table.options if (!grouping.length || !groupedColumnMode) { diff --git a/packages/table-core/src/features/column-pinning/columnPinningFeature.ts b/packages/table-core/src/features/column-pinning/columnPinningFeature.ts index 2bceedc5ac..ffd713528c 100644 --- a/packages/table-core/src/features/column-pinning/columnPinningFeature.ts +++ b/packages/table-core/src/features/column-pinning/columnPinningFeature.ts @@ -102,24 +102,24 @@ export function constructColumnPinningFeature< fn: (row) => row_getCenterVisibleCells(row), memoDeps: (row) => [ row.getAllCells(), - row.table.store.state.columnPinning, - row.table.store.state.columnVisibility, + row.table.atoms.columnPinning.get(), + row.table.atoms.columnVisibility.get(), ], }, row_getLeftVisibleCells: { fn: (row) => row_getLeftVisibleCells(row), memoDeps: (row) => [ row.getAllCells(), - row.table.store.state.columnPinning?.left, - row.table.store.state.columnVisibility, + row.table.atoms.columnPinning.get()?.left, + row.table.atoms.columnVisibility.get(), ], }, row_getRightVisibleCells: { fn: (row) => row_getRightVisibleCells(row), memoDeps: (row) => [ row.getAllCells(), - row.table.store.state.columnPinning?.right, - row.table.store.state.columnVisibility, + row.table.atoms.columnPinning.get()?.right, + row.table.atoms.columnVisibility.get(), ], }, }) @@ -146,8 +146,8 @@ export function constructColumnPinningFeature< 'getVisibleLeafColumns', table_getVisibleLeafColumns, ), - table.store.state.columnPinning?.left, - table.store.state.columnOrder, + table.atoms.columnPinning.get()?.left, + table.atoms.columnOrder.get(), ], }, table_getCenterHeaderGroups: { @@ -159,8 +159,8 @@ export function constructColumnPinningFeature< 'getVisibleLeafColumns', table_getVisibleLeafColumns, ), - table.store.state.columnPinning, - table.store.state.columnOrder, + table.atoms.columnPinning.get(), + table.atoms.columnOrder.get(), ], }, table_getRightHeaderGroups: { @@ -172,8 +172,8 @@ export function constructColumnPinningFeature< 'getVisibleLeafColumns', table_getVisibleLeafColumns, ), - table.store.state.columnPinning?.right, - table.store.state.columnOrder, + table.atoms.columnPinning.get()?.right, + table.atoms.columnOrder.get(), ], }, // footer groups @@ -274,21 +274,21 @@ export function constructColumnPinningFeature< fn: () => table_getLeftLeafColumns(table), memoDeps: () => [ table.options.columns, - table.store.state.columnPinning, + table.atoms.columnPinning.get(), ], }, table_getRightLeafColumns: { fn: () => table_getRightLeafColumns(table), memoDeps: () => [ table.options.columns, - table.store.state.columnPinning, + table.atoms.columnPinning.get(), ], }, table_getCenterLeafColumns: { fn: () => table_getCenterLeafColumns(table), memoDeps: () => [ table.options.columns, - table.store.state.columnPinning, + table.atoms.columnPinning.get(), ], }, // visible leaf columns @@ -296,24 +296,24 @@ export function constructColumnPinningFeature< fn: () => table_getLeftVisibleLeafColumns(table), memoDeps: () => [ table.options.columns, - table.store.state.columnPinning, - table.store.state.columnVisibility, + table.atoms.columnPinning.get(), + table.atoms.columnVisibility.get(), ], }, table_getCenterVisibleLeafColumns: { fn: () => table_getCenterVisibleLeafColumns(table), memoDeps: () => [ table.options.columns, - table.store.state.columnPinning, - table.store.state.columnVisibility, + table.atoms.columnPinning.get(), + table.atoms.columnVisibility.get(), ], }, table_getRightVisibleLeafColumns: { fn: () => table_getRightVisibleLeafColumns(table), memoDeps: () => [ table.options.columns, - table.store.state.columnPinning, - table.store.state.columnVisibility, + table.atoms.columnPinning.get(), + table.atoms.columnVisibility.get(), ], }, }) diff --git a/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts b/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts index 1a9c60bcbb..966f5bb558 100644 --- a/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts +++ b/packages/table-core/src/features/column-pinning/columnPinningFeature.utils.ts @@ -92,7 +92,7 @@ export function column_getIsPinned< const leafColumnIds = column.getLeafColumns().map((d) => d.id) const { left, right } = - column.table.store.state.columnPinning ?? getDefaultColumnPinningState() + column.table.atoms.columnPinning.get() ?? getDefaultColumnPinningState() const isLeft = leafColumnIds.some((d) => left.includes(d)) const isRight = leafColumnIds.some((d) => right.includes(d)) @@ -108,7 +108,7 @@ export function column_getPinnedIndex< const position = column_getIsPinned(column) return position - ? (column.table.store.state.columnPinning?.[position].indexOf(column.id) ?? + ? (column.table.atoms.columnPinning.get()?.[position].indexOf(column.id) ?? -1) : 0 } @@ -125,7 +125,7 @@ export function row_getCenterVisibleCells< row_getAllVisibleCells, ) const { left, right } = - row.table.store.state.columnPinning ?? getDefaultColumnPinningState() + row.table.atoms.columnPinning.get() ?? getDefaultColumnPinningState() const leftAndRight: Array = [...left, ...right] return allCells.filter((d) => !leftAndRight.includes(d.column.id)) } @@ -140,7 +140,7 @@ export function row_getLeftVisibleCells< row_getAllVisibleCells, ) const { left } = - row.table.store.state.columnPinning ?? getDefaultColumnPinningState() + row.table.atoms.columnPinning.get() ?? getDefaultColumnPinningState() const cells = left .map((columnId) => allCells.find((cell) => cell.column.id === columnId)!) .filter(Boolean) @@ -161,7 +161,7 @@ export function row_getRightVisibleCells< row_getAllVisibleCells, ) const { right } = - row.table.store.state.columnPinning ?? getDefaultColumnPinningState() + row.table.atoms.columnPinning.get() ?? getDefaultColumnPinningState() const cells = right .map((columnId) => allCells.find((cell) => cell.column.id === columnId)!) .filter(Boolean) @@ -200,7 +200,7 @@ export function table_getIsSomeColumnsPinned< TFeatures extends TableFeatures, TData extends RowData, >(table: Table_Internal, position?: ColumnPinningPosition) { - const pinningState = table.store.state.columnPinning + const pinningState = table.atoms.columnPinning.get() if (!position) { return Boolean(pinningState?.left.length || pinningState?.right.length) @@ -221,7 +221,7 @@ export function table_getLeftHeaderGroups< table_getVisibleLeafColumns, ) as Array> const { left } = - table.store.state.columnPinning ?? getDefaultColumnPinningState() + table.atoms.columnPinning.get() ?? getDefaultColumnPinningState() const orderedLeafColumns = left .map((columnId) => leafColumns.find((d) => d.id === columnId)!) @@ -241,7 +241,7 @@ export function table_getRightHeaderGroups< table_getVisibleLeafColumns, ) as unknown as Array> const { right } = - table.store.state.columnPinning ?? getDefaultColumnPinningState() + table.atoms.columnPinning.get() ?? getDefaultColumnPinningState() const orderedLeafColumns = right .map((columnId) => leafColumns.find((d) => d.id === columnId)!) @@ -263,7 +263,7 @@ export function table_getCenterHeaderGroups< table_getVisibleLeafColumns, ) as unknown as Array> const { left, right } = - table.store.state.columnPinning ?? getDefaultColumnPinningState() + table.atoms.columnPinning.get() ?? getDefaultColumnPinningState() const leftAndRight: Array = [...left, ...right] leafColumns = leafColumns.filter( @@ -402,7 +402,7 @@ export function table_getLeftLeafColumns< TData extends RowData, >(table: Table_Internal) { const { left } = - table.store.state.columnPinning ?? getDefaultColumnPinningState() + table.atoms.columnPinning.get() ?? getDefaultColumnPinningState() return left .map( (columnId) => @@ -416,7 +416,7 @@ export function table_getRightLeafColumns< TData extends RowData, >(table: Table_Internal) { const { right } = - table.store.state.columnPinning ?? getDefaultColumnPinningState() + table.atoms.columnPinning.get() ?? getDefaultColumnPinningState() return right .map( (columnId) => @@ -430,7 +430,7 @@ export function table_getCenterLeafColumns< TData extends RowData, >(table: Table_Internal) { const { left, right } = - table.store.state.columnPinning ?? getDefaultColumnPinningState() + table.atoms.columnPinning.get() ?? getDefaultColumnPinningState() const leftAndRight: Array = [...left, ...right] return table.getAllLeafColumns().filter((d) => !leftAndRight.includes(d.id)) } diff --git a/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts b/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts index b3bbbb0c4e..f3e60d8ee2 100644 --- a/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts +++ b/packages/table-core/src/features/column-resizing/columnResizingFeature.utils.ts @@ -39,7 +39,7 @@ export function column_getIsResizing< TData extends RowData, TValue extends CellData = CellData, >(column: Column_Internal) { - return column.table.store.state.columnResizing?.isResizingColumn === column.id + return column.table.atoms.columnResizing.get()?.isResizingColumn === column.id } export function header_getResizeHandler< diff --git a/packages/table-core/src/features/column-sizing/columnSizingFeature.ts b/packages/table-core/src/features/column-sizing/columnSizingFeature.ts index 18d99e6bd2..62cee0c91c 100644 --- a/packages/table-core/src/features/column-sizing/columnSizingFeature.ts +++ b/packages/table-core/src/features/column-sizing/columnSizingFeature.ts @@ -81,7 +81,7 @@ export function constructColumnSizingFeature< table_getPinnedVisibleLeafColumns, position, ), - column.table.store.state.columnSizing, + column.table.atoms.columnSizing.get(), ], }, column_getAfter: { @@ -94,7 +94,7 @@ export function constructColumnSizingFeature< table_getPinnedVisibleLeafColumns, position, ), - column.table.store.state.columnSizing, + column.table.atoms.columnSizing.get(), ], }, column_resetSize: { diff --git a/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts b/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts index 2782486548..4c4926c6cd 100644 --- a/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts +++ b/packages/table-core/src/features/column-sizing/columnSizingFeature.utils.ts @@ -32,7 +32,7 @@ export function column_getSize< TValue extends CellData = CellData, >(column: Column_Internal): number { const defaultSizes = getDefaultColumnSizingColumnDef() - const columnSize = column.table.store.state.columnSizing?.[column.id] + const columnSize = column.table.atoms.columnSizing.get()?.[column.id] return Math.min( Math.max( diff --git a/packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts b/packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts index c0a0618458..a2de7b95f9 100644 --- a/packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts +++ b/packages/table-core/src/features/column-visibility/columnVisibilityFeature.ts @@ -72,7 +72,7 @@ export function constructColumnVisibilityFeature< fn: (column) => column_getIsVisible(column), memoDeps: (column) => [ column.table.options.columns, - column.table.store.state.columnVisibility, + column.table.atoms.columnVisibility.get(), column.columns, ], }, @@ -94,7 +94,7 @@ export function constructColumnVisibilityFeature< fn: (row) => row_getAllVisibleCells(row), memoDeps: (row) => [ row.getAllCells(), - row.table.store.state.columnVisibility, + row.table.atoms.columnVisibility.get(), ], }, row_getVisibleCells: { @@ -114,16 +114,16 @@ export function constructColumnVisibilityFeature< table_getVisibleFlatColumns: { fn: () => table_getVisibleFlatColumns(table), memoDeps: () => [ - table.store.state.columnVisibility, - table.store.state.columnOrder, + table.atoms.columnVisibility.get(), + table.atoms.columnOrder.get(), table.options.columns, ], }, table_getVisibleLeafColumns: { fn: () => table_getVisibleLeafColumns(table), memoDeps: () => [ - table.store.state.columnVisibility, - table.store.state.columnOrder, + table.atoms.columnVisibility.get(), + table.atoms.columnOrder.get(), table.options.columns, ], }, diff --git a/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts b/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts index e2f49984a6..a73f046a56 100644 --- a/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts +++ b/packages/table-core/src/features/column-visibility/columnVisibilityFeature.utils.ts @@ -37,7 +37,7 @@ export function column_getIsVisible< ? childColumns.some((childColumn) => callMemoOrStaticFn(childColumn, 'getIsVisible', column_getIsVisible), ) - : column.table.store.state.columnVisibility?.[column.id]) ?? true + : column.table.atoms.columnVisibility.get()?.[column.id]) ?? true ) } diff --git a/packages/table-core/src/features/row-expanding/createExpandedRowModel.ts b/packages/table-core/src/features/row-expanding/createExpandedRowModel.ts index 1ef2c49ccc..335664a2b2 100644 --- a/packages/table-core/src/features/row-expanding/createExpandedRowModel.ts +++ b/packages/table-core/src/features/row-expanding/createExpandedRowModel.ts @@ -17,7 +17,7 @@ export function createExpandedRowModel< table, fnName: 'table.getExpandedRowModel', memoDeps: () => [ - table.store.state.expanded, + table.atoms.expanded.get(), table.getPreExpandedRowModel(), table.options.paginateExpandedRows, ], @@ -31,7 +31,7 @@ function _createExpandedRowModel< TData extends RowData = any, >(table: Table_Internal): RowModel { const rowModel = table.getPreExpandedRowModel() - const expanded = table.store.state.expanded + const expanded = table.atoms.expanded.get() if ( !rowModel.rows.length || 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 2e4d300f45..9537d16f43 100644 --- a/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts +++ b/packages/table-core/src/features/row-expanding/rowExpandingFeature.utils.ts @@ -75,7 +75,7 @@ export function table_getIsSomeRowsExpanded< TFeatures extends TableFeatures, TData extends RowData, >(table: Table_Internal) { - const expanded = table.store.state.expanded ?? {} + const expanded = table.atoms.expanded.get() ?? {} return expanded === true || Object.values(expanded).some(Boolean) } @@ -83,7 +83,7 @@ export function table_getIsAllRowsExpanded< TFeatures extends TableFeatures, TData extends RowData, >(table: Table_Internal) { - const expanded = table.store.state.expanded ?? {} + const expanded = table.atoms.expanded.get() ?? {} // If expanded is true, save some cycles and return true if (expanded === true) { @@ -110,9 +110,9 @@ export function table_getExpandedDepth< let maxDepth = 0 const rowIds = - table.store.state.expanded === true + table.atoms.expanded.get() === true ? Object.keys(table.getRowModel().rowsById) - : Object.keys(table.store.state.expanded ?? {}) + : Object.keys(table.atoms.expanded.get() ?? {}) rowIds.forEach((id) => { const splitId = id.split('.') @@ -161,7 +161,7 @@ export function row_getIsExpanded< TFeatures extends TableFeatures, TData extends RowData, >(row: Row) { - const expanded = row.table.store.state.expanded ?? ({} as ExpandedState) + const expanded = row.table.atoms.expanded.get() ?? ({} as ExpandedState) return !!( row.table.options.getIsRowExpanded?.(row) ?? diff --git a/packages/table-core/src/features/row-pagination/createPaginatedRowModel.ts b/packages/table-core/src/features/row-pagination/createPaginatedRowModel.ts index 44548e0a12..d9a4d6130b 100644 --- a/packages/table-core/src/features/row-pagination/createPaginatedRowModel.ts +++ b/packages/table-core/src/features/row-pagination/createPaginatedRowModel.ts @@ -19,9 +19,9 @@ export function createPaginatedRowModel< fnName: 'table.getPaginatedRowModel', memoDeps: () => [ table.getPrePaginatedRowModel(), - table.store.state.pagination, + table.atoms.pagination.get(), table.options.paginateExpandedRows - ? table.store.state.expanded + ? table.atoms.expanded.get() : undefined, ], fn: () => _createPaginatedRowModel(table), @@ -34,7 +34,7 @@ function _createPaginatedRowModel< TData extends RowData = any, >(table: Table_Internal): RowModel { const prePaginatedRowModel = table.getPrePaginatedRowModel() - const pagination = table.store.state.pagination + const pagination = table.atoms.pagination.get() if (!prePaginatedRowModel.rows.length) { return prePaginatedRowModel diff --git a/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts b/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts index 4a6cc76033..dfa915bc64 100644 --- a/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts +++ b/packages/table-core/src/features/row-pagination/rowPaginationFeature.utils.ts @@ -131,14 +131,14 @@ export function table_getCanPreviousPage< TFeatures extends TableFeatures, TData extends RowData, >(table: Table_Internal) { - return (table.store.state.pagination?.pageIndex ?? 0) > 0 + return (table.atoms.pagination.get()?.pageIndex ?? 0) > 0 } export function table_getCanNextPage< TFeatures extends TableFeatures, TData extends RowData, >(table: Table_Internal) { - const pageIndex = table.store.state.pagination?.pageIndex ?? defaultPageIndex + const pageIndex = table.atoms.pagination.get()?.pageIndex ?? defaultPageIndex const pageCount = table_getPageCount(table) @@ -191,7 +191,7 @@ export function table_getPageCount< table.options.pageCount ?? Math.ceil( table_getRowCount(table) / - (table.store.state.pagination?.pageSize ?? defaultPageSize), + (table.atoms.pagination.get()?.pageSize ?? defaultPageSize), ) ) } diff --git a/packages/table-core/src/features/row-pinning/rowPinningFeature.ts b/packages/table-core/src/features/row-pinning/rowPinningFeature.ts index 1ba5caf221..aec8cbc572 100644 --- a/packages/table-core/src/features/row-pinning/rowPinningFeature.ts +++ b/packages/table-core/src/features/row-pinning/rowPinningFeature.ts @@ -68,7 +68,7 @@ export function constructRowPinningFeature< fn: (row) => row_getPinnedIndex(row), memoDeps: (row) => [ row.table.getRowModel().rows, - row.table.store.state.rowPinning, + row.table.atoms.rowPinning.get(), ], }, row_pin: { @@ -93,21 +93,21 @@ export function constructRowPinningFeature< fn: () => table_getTopRows(table), memoDeps: () => [ table.getRowModel().rows, - table.store.state.rowPinning?.top, + table.atoms.rowPinning.get()?.top, ], }, table_getBottomRows: { fn: () => table_getBottomRows(table), memoDeps: () => [ table.getRowModel().rows, - table.store.state.rowPinning?.bottom, + table.atoms.rowPinning.get()?.bottom, ], }, table_getCenterRows: { fn: () => table_getCenterRows(table), memoDeps: () => [ table.getRowModel().rows, - table.store.state.rowPinning, + table.atoms.rowPinning.get(), ], }, }) 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 0b3ae0e7ed..21a80c3736 100644 --- a/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts +++ b/packages/table-core/src/features/row-pinning/rowPinningFeature.utils.ts @@ -49,7 +49,7 @@ export function table_getIsSomeRowsPinned< table: Table_Internal, position?: RowPinningPosition, ): boolean { - const rowPinning = table.store.state.rowPinning + const rowPinning = table.atoms.rowPinning.get() if (!position) { return Boolean(rowPinning?.top.length || rowPinning?.bottom.length) @@ -65,7 +65,7 @@ function table_getPinnedRows< position: 'top' | 'bottom', ): Array> { const visibleRows = table.getRowModel().rows - const pinnedRowIds = table.store.state.rowPinning?.[position] ?? [] + const pinnedRowIds = table.atoms.rowPinning.get()?.[position] ?? [] const rows = (table.options.keepPinnedRows ?? true) @@ -107,7 +107,7 @@ export function table_getCenterRows< TData extends RowData, >(table: Table_Internal): Array> { const { top, bottom } = - table.store.state.rowPinning ?? getDefaultRowPinningState() + table.atoms.rowPinning.get() ?? getDefaultRowPinningState() const allRows = table.getRowModel().rows const topAndBottom = new Set([...top, ...bottom]) @@ -132,7 +132,7 @@ export function row_getIsPinned< TData extends RowData, >(row: Row): RowPinningPosition { const { top, bottom } = - row.table.store.state.rowPinning ?? getDefaultRowPinningState() + row.table.atoms.rowPinning.get() ?? getDefaultRowPinningState() return top.includes(row.id) ? 'top' diff --git a/packages/table-core/src/features/row-selection/rowSelectionFeature.ts b/packages/table-core/src/features/row-selection/rowSelectionFeature.ts index b6d0ecad13..265deb2449 100644 --- a/packages/table-core/src/features/row-selection/rowSelectionFeature.ts +++ b/packages/table-core/src/features/row-selection/rowSelectionFeature.ts @@ -117,21 +117,21 @@ export function constructRowSelectionFeature< table_getSelectedRowModel: { fn: () => table_getSelectedRowModel(table), memoDeps: () => [ - table.store.state.rowSelection, + table.atoms.rowSelection.get(), table.getCoreRowModel(), ], }, table_getFilteredSelectedRowModel: { fn: () => table_getFilteredSelectedRowModel(table), memoDeps: () => [ - table.store.state.rowSelection, + table.atoms.rowSelection.get(), table.getFilteredRowModel(), ], }, table_getGroupedSelectedRowModel: { fn: () => table_getGroupedSelectedRowModel(table), memoDeps: () => [ - table.store.state.rowSelection, + table.atoms.rowSelection.get(), table.getSortedRowModel(), ], }, 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 eaa7a39465..0f70943d3e 100644 --- a/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts +++ b/packages/table-core/src/features/row-selection/rowSelectionFeature.types.ts @@ -3,7 +3,7 @@ import type { TableFeatures } from '../../types/TableFeatures' import type { RowModel } from '../../core/row-models/coreRowModelsFeature.types' import type { Row } from '../../types/Row' -export type RowSelectionState = Record +export type RowSelectionState = Record export interface TableState_RowSelection { rowSelection: RowSelectionState 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 cca1f732b3..b10d6836bc 100644 --- a/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts +++ b/packages/table-core/src/features/row-selection/rowSelectionFeature.utils.ts @@ -97,7 +97,7 @@ export function table_getSelectedRowModel< >(table: Table_Internal) { const rowModel = table.getCoreRowModel() - if (!Object.keys(table.store.state.rowSelection ?? {}).length) { + if (!Object.keys(table.atoms.rowSelection.get() ?? {}).length) { return { rows: [], flatRows: [], @@ -114,7 +114,7 @@ export function table_getFilteredSelectedRowModel< >(table: Table_Internal) { const rowModel = table.getCoreRowModel() - if (!Object.keys(table.store.state.rowSelection ?? {}).length) { + if (!Object.keys(table.atoms.rowSelection.get() ?? {}).length) { return { rows: [], flatRows: [], @@ -131,7 +131,7 @@ export function table_getGroupedSelectedRowModel< >(table: Table_Internal) { const rowModel = table.getCoreRowModel() - if (!Object.keys(table.store.state.rowSelection ?? {}).length) { + if (!Object.keys(table.atoms.rowSelection.get() ?? {}).length) { return { rows: [], flatRows: [], @@ -148,7 +148,7 @@ export function table_getIsAllRowsSelected< >(table: Table_Internal) { const preGroupedFlatRows = table.getFilteredRowModel().flatRows const rowSelection = - table.store.state.rowSelection ?? ({} as RowSelectionState) + table.atoms.rowSelection.get() ?? ({} as RowSelectionState) let isAllRowsSelected = Boolean( preGroupedFlatRows.length && Object.keys(rowSelection).length, @@ -175,7 +175,7 @@ export function table_getIsAllPageRowsSelected< .getPaginatedRowModel() .flatRows.filter((row) => row_getCanSelect(row)) const rowSelection = - table.store.state.rowSelection ?? ({} as RowSelectionState) + table.atoms.rowSelection.get() ?? ({} as RowSelectionState) let isAllPageRowsSelected = !!paginationFlatRows.length @@ -193,7 +193,7 @@ export function table_getIsSomeRowsSelected< TFeatures extends TableFeatures, TData extends RowData, >(table: Table_Internal) { - const totalSelected = Object.keys(table.store.state.rowSelection ?? {}).length + const totalSelected = Object.keys(table.atoms.rowSelection.get() ?? {}).length return ( totalSelected > 0 && totalSelected < table.getFilteredRowModel().flatRows.length @@ -347,7 +347,7 @@ const mutateRowIsSelected = < TFeatures extends TableFeatures, TData extends RowData, >( - selectedRowIds: Record, + selectedRowIds: Record, rowId: string, value: boolean, includeChildren: boolean, @@ -419,7 +419,7 @@ export function isRowSelected< TFeatures extends TableFeatures, TData extends RowData, >(row: Row): boolean { - return (row.table.store.state.rowSelection ?? {})[row.id] ?? false + return (row.table.atoms.rowSelection.get() ?? {})[row.id] ?? false } export function isSubRowSelected< diff --git a/packages/table-core/src/features/row-sorting/createSortedRowModel.ts b/packages/table-core/src/features/row-sorting/createSortedRowModel.ts index 50dfd35c70..0a9f0b140f 100644 --- a/packages/table-core/src/features/row-sorting/createSortedRowModel.ts +++ b/packages/table-core/src/features/row-sorting/createSortedRowModel.ts @@ -22,7 +22,7 @@ export function createSortedRowModel< feature: 'rowSortingFeature', table, fnName: 'table.getSortedRowModel', - memoDeps: () => [table.store.state.sorting, table.getPreSortedRowModel()], + memoDeps: () => [table.atoms.sorting.get(), table.getPreSortedRowModel()], fn: () => _createSortedRowModel(table), onAfterUpdate: () => table_autoResetPageIndex(table), }) @@ -34,7 +34,7 @@ function _createSortedRowModel< TData extends RowData = any, >(table: Table_Internal): RowModel { const preSortedRowModel = table.getPreSortedRowModel() - const sorting = table.store.state.sorting + const sorting = table.atoms.sorting.get() if (!preSortedRowModel.rows.length || !sorting?.length) { return preSortedRowModel 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 2a1221cb64..a5f1212e5f 100644 --- a/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts +++ b/packages/table-core/src/features/row-sorting/rowSortingFeature.utils.ts @@ -271,9 +271,9 @@ export function column_getIsSorted< TData extends RowData, TValue extends CellData = CellData, >(column: Column_Internal): false | SortDirection { - const columnSort = column.table.store.state.sorting?.find( - (d) => d.id === column.id, - ) + const columnSort = column.table.atoms.sorting + .get() + ?.find((d) => d.id === column.id) return !columnSort ? false : columnSort.desc ? 'desc' : 'asc' } @@ -283,7 +283,7 @@ export function column_getSortIndex< TValue extends CellData = CellData, >(column: Column_Internal): number { return ( - column.table.store.state.sorting?.findIndex((d) => d.id === column.id) ?? -1 + column.table.atoms.sorting.get()?.findIndex((d) => d.id === column.id) ?? -1 ) } diff --git a/packages/table-core/src/features/table-reactivity/tableReactivityFeature.ts b/packages/table-core/src/features/table-reactivity/tableReactivityFeature.ts index 9e0028a0e3..2ab4194a9c 100644 --- a/packages/table-core/src/features/table-reactivity/tableReactivityFeature.ts +++ b/packages/table-core/src/features/table-reactivity/tableReactivityFeature.ts @@ -21,6 +21,12 @@ export function constructReactivityFeature< table.optionsStore, bindings.optionsNotifier, ) + // Also wrap per-slice atoms so that feature code reading + // `table.atoms..get()` (or the writable `table.baseAtoms` variant) + // registers a framework reactivity dep, the same way + // `table.store.state` does above. + table.atoms = bindAtoms(table.atoms, bindings.stateNotifier) + table.baseAtoms = bindAtoms(table.baseAtoms, bindings.stateNotifier) }, } } @@ -45,3 +51,47 @@ const bindStore = | ReadonlyStore>( return store } + +// Wraps an atoms/baseAtoms map (Proxy-backed) so that `.get()` on any +// individual atom calls the framework notifier first — matching how +// `bindStore` wraps `store.state`. +const bindAtoms = (atoms: T, notifier?: () => unknown): T => { + if (!notifier) return atoms + // Cache wrapped atoms so referential identity is stable per slice. + const wrappedCache = new Map() + return new Proxy(atoms, { + get(target, prop, receiver) { + const atom = Reflect.get(target, prop, receiver) as unknown + if (!atom || typeof prop !== 'string' || !isAtomLike(atom)) { + return atom + } + if (wrappedCache.has(prop)) return wrappedCache.get(prop) + const originalGet = atom.get.bind(atom) + const wrapped = new Proxy(atom, { + get(atomTarget, atomProp, atomReceiver) { + if (atomProp === 'get') { + return () => { + notifier() + return originalGet() + } + } + return Reflect.get(atomTarget, atomProp, atomReceiver) + }, + }) + wrappedCache.set(prop, wrapped) + return wrapped + }, + }) +} + +interface AtomLike { + get: () => unknown +} + +function isAtomLike(value: unknown): value is AtomLike { + return ( + typeof value === 'object' && + value !== null && + typeof (value as { get?: unknown }).get === 'function' + ) +} diff --git a/packages/table-core/src/index.ts b/packages/table-core/src/index.ts index 5c30d25bd8..4d2e363d1a 100755 --- a/packages/table-core/src/index.ts +++ b/packages/table-core/src/index.ts @@ -31,38 +31,32 @@ export * from './utils' export * from './core/cells/constructCell' export * from './core/cells/coreCellsFeature' export * from './core/cells/coreCellsFeature.types' -export * from './core/cells/coreCellsFeature.utils' // Columns export * from './core/columns/constructColumn' export * from './core/columns/coreColumnsFeature' export * from './core/columns/coreColumnsFeature.types' -export * from './core/columns/coreColumnsFeature.utils' // Headers export * from './core/headers/buildHeaderGroups' export * from './core/headers/constructHeader' export * from './core/headers/coreHeadersFeature' export * from './core/headers/coreHeadersFeature.types' -export * from './core/headers/coreHeadersFeature.utils' // Rows export * from './core/rows/constructRow' export * from './core/rows/coreRowsFeature' export * from './core/rows/coreRowsFeature.types' -export * from './core/rows/coreRowsFeature.utils' // Row Models export * from './core/row-models/coreRowModelsFeature' export * from './core/row-models/coreRowModelsFeature.types' -export * from './core/row-models/coreRowModelsFeature.utils' export * from './core/row-models/createCoreRowModel' // Tables export * from './core/table/constructTable' export * from './core/table/coreTablesFeature' export * from './core/table/coreTablesFeature.types' -export * from './core/table/coreTablesFeature.utils' /** * RowModelFns @@ -84,7 +78,6 @@ export * from './features/table-reactivity/tableReactivityFeature' // columnFacetingFeature export * from './features/column-faceting/columnFacetingFeature' export * from './features/column-faceting/columnFacetingFeature.types' -export * from './features/column-faceting/columnFacetingFeature.utils' export * from './features/column-faceting/createFacetedMinMaxValues' export * from './features/column-faceting/createFacetedRowModel' export * from './features/column-faceting/createFacetedUniqueValues' @@ -92,71 +85,58 @@ export * from './features/column-faceting/createFacetedUniqueValues' // columnFilteringFeature export * from './features/column-filtering/columnFilteringFeature' export * from './features/column-filtering/columnFilteringFeature.types' -export * from './features/column-filtering/columnFilteringFeature.utils' export * from './features/column-filtering/createFilteredRowModel' // columnGroupingFeature export * from './features/column-grouping/columnGroupingFeature' export * from './features/column-grouping/columnGroupingFeature.types' -export * from './features/column-grouping/columnGroupingFeature.utils' export * from './features/column-grouping/createGroupedRowModel' // columnOrderingFeature export * from './features/column-ordering/columnOrderingFeature' export * from './features/column-ordering/columnOrderingFeature.types' -export * from './features/column-ordering/columnOrderingFeature.utils' // columnPinningFeature export * from './features/column-pinning/columnPinningFeature' export * from './features/column-pinning/columnPinningFeature.types' -export * from './features/column-pinning/columnPinningFeature.utils' // columnResizingFeature export * from './features/column-resizing/columnResizingFeature' export * from './features/column-resizing/columnResizingFeature.types' -export * from './features/column-resizing/columnResizingFeature.utils' // columnSizingFeature export * from './features/column-sizing/columnSizingFeature' export * from './features/column-sizing/columnSizingFeature.types' -export * from './features/column-sizing/columnSizingFeature.utils' // columnVisibilityFeature export * from './features/column-visibility/columnVisibilityFeature' export * from './features/column-visibility/columnVisibilityFeature.types' -export * from './features/column-visibility/columnVisibilityFeature.utils' // globalFilteringFeature export * from './features/global-filtering/globalFilteringFeature' export * from './features/global-filtering/globalFilteringFeature.types' -export * from './features/global-filtering/globalFilteringFeature.utils' // rowExpandingFeature export * from './features/row-expanding/rowExpandingFeature' export * from './features/row-expanding/rowExpandingFeature.types' -export * from './features/row-expanding/rowExpandingFeature.utils' export * from './features/row-expanding/createExpandedRowModel' // rowPaginationFeature export * from './features/row-pagination/rowPaginationFeature' export * from './features/row-pagination/rowPaginationFeature.types' -export * from './features/row-pagination/rowPaginationFeature.utils' export * from './features/row-pagination/createPaginatedRowModel' // rowPinningFeature export * from './features/row-pinning/rowPinningFeature' export * from './features/row-pinning/rowPinningFeature.types' -export * from './features/row-pinning/rowPinningFeature.utils' // rowSelectionFeature export * from './features/row-selection/rowSelectionFeature' export * from './features/row-selection/rowSelectionFeature.types' -export * from './features/row-selection/rowSelectionFeature.utils' // rowSortingFeature export * from './features/row-sorting/rowSortingFeature' export * from './features/row-sorting/rowSortingFeature.types' -export * from './features/row-sorting/rowSortingFeature.utils' export * from './features/row-sorting/createSortedRowModel' // force diff --git a/packages/table-core/src/static-functions.ts b/packages/table-core/src/static-functions.ts new file mode 100644 index 0000000000..ef832ee7ff --- /dev/null +++ b/packages/table-core/src/static-functions.ts @@ -0,0 +1,31 @@ +/** + * Static utility functions sub-entry. + * + * Re-exports all standalone utility functions from each feature's `.utils.ts` + * module so consumers that want the functions (without constructing a table) + * can grab them from a single path. + */ + +// Core +export * from './core/cells/coreCellsFeature.utils' +export * from './core/columns/coreColumnsFeature.utils' +export * from './core/headers/coreHeadersFeature.utils' +export * from './core/rows/coreRowsFeature.utils' +export * from './core/row-models/coreRowModelsFeature.utils' +export * from './core/table/coreTablesFeature.utils' + +// Features +export * from './features/column-faceting/columnFacetingFeature.utils' +export * from './features/column-filtering/columnFilteringFeature.utils' +export * from './features/column-grouping/columnGroupingFeature.utils' +export * from './features/column-ordering/columnOrderingFeature.utils' +export * from './features/column-pinning/columnPinningFeature.utils' +export * from './features/column-resizing/columnResizingFeature.utils' +export * from './features/column-sizing/columnSizingFeature.utils' +export * from './features/column-visibility/columnVisibilityFeature.utils' +export * from './features/global-filtering/globalFilteringFeature.utils' +export * from './features/row-expanding/rowExpandingFeature.utils' +export * from './features/row-pagination/rowPaginationFeature.utils' +export * from './features/row-pinning/rowPinningFeature.utils' +export * from './features/row-selection/rowSelectionFeature.utils' +export * from './features/row-sorting/rowSortingFeature.utils' diff --git a/packages/table-core/src/types/Table.ts b/packages/table-core/src/types/Table.ts index 075ff363c7..6c27d25a17 100644 --- a/packages/table-core/src/types/Table.ts +++ b/packages/table-core/src/types/Table.ts @@ -1,4 +1,4 @@ -import type { ReadonlyStore, Store } from '@tanstack/store' +import type { ReadonlyStore } from '@tanstack/store' import type { Table_ColumnFaceting } from '../features/column-faceting/columnFacetingFeature.types' import type { Table_ColumnResizing } from '../features/column-resizing/columnResizingFeature.types' import type { Table_ColumnFiltering } from '../features/column-filtering/columnFilteringFeature.types' @@ -22,7 +22,12 @@ import type { ExtractFeatureTypes, TableFeatures } from './TableFeatures' import type { Table_Columns } from '../core/columns/coreColumnsFeature.types' import type { Table_Headers } from '../core/headers/coreHeadersFeature.types' import type { Table_Rows } from '../core/rows/coreRowsFeature.types' -import type { Table_Table } from '../core/table/coreTablesFeature.types' +import type { + Atoms_All, + BaseAtoms_All, + ExternalAtoms_All, + Table_Table, +} from '../core/table/coreTablesFeature.types' import type { TableOptions_All } from './TableOptions' /** @@ -118,8 +123,10 @@ export type Table_Internal< _rowModels?: CreateRowModels_All state?: TableState_All initialState?: TableState_All + atoms?: ExternalAtoms_All } initialState: TableState_All - baseStore: Store + baseAtoms: BaseAtoms_All + atoms: Atoms_All store: ReadonlyStore } diff --git a/packages/table-core/src/utils.ts b/packages/table-core/src/utils.ts index 18877a09f3..d2b74e343f 100755 --- a/packages/table-core/src/utils.ts +++ b/packages/table-core/src/utils.ts @@ -16,14 +16,9 @@ export function makeStateUpdater< K extends (string & {}) | keyof TableState_All | keyof TableState, >(key: K, instance: Table) { return (updater: Updater[K & keyof TableState]>) => { - instance.baseStore.setState( - (old: TTableState) => { - return { - ...old, - [key]: functionalUpdate(updater, (old as any)[key]), - } - }, - ) + const externalAtom = (instance.options as any).atoms?.[key] + const targetAtom = externalAtom ?? (instance.baseAtoms as any)[key] + targetAtom.set((old: any) => functionalUpdate(updater, old)) } } diff --git a/packages/table-core/tests/implementation/features/row-pinning/rowPinningFeature.test.ts b/packages/table-core/tests/implementation/features/row-pinning/rowPinningFeature.test.ts index 538c204b55..c929e7ebbb 100644 --- a/packages/table-core/tests/implementation/features/row-pinning/rowPinningFeature.test.ts +++ b/packages/table-core/tests/implementation/features/row-pinning/rowPinningFeature.test.ts @@ -331,13 +331,10 @@ describe('row methods', () => { const { table, onRowPinningChangeMock } = createTableWithMockOnPinningChange() // Set up initial state with a pinned row - table.baseStore.setState((old: any) => ({ - ...old, - rowPinning: { - top: [ROW[0]], - bottom: [], - }, - })) + table.baseAtoms.rowPinning.set({ + top: [ROW[0]], + bottom: [], + }) const row = table.getRow(ROW[0]) row.pin(false) diff --git a/packages/table-core/tests/unit/core/tableAtoms.test.ts b/packages/table-core/tests/unit/core/tableAtoms.test.ts new file mode 100644 index 0000000000..698e49594a --- /dev/null +++ b/packages/table-core/tests/unit/core/tableAtoms.test.ts @@ -0,0 +1,176 @@ +import { describe, expect, it, vi } from 'vitest' +import { createAtom } from '@tanstack/store' +import { + constructTable, + rowPaginationFeature, + rowSelectionFeature, + rowSortingFeature, +} from '../../../src' +import type { Table_Internal } from '../../../src' +import type { PaginationState, SortingState } from '../../../src' + +const _features = { + rowPaginationFeature, + rowSelectionFeature, + rowSortingFeature, +} + +function makeTable(options: any = {}) { + return constructTable({ + _features, + _rowModels: {}, + columns: [], + data: [], + ...options, + }) as unknown as Table_Internal +} + +describe('three-layer atom architecture', () => { + describe('baseAtoms (writable internal layer)', () => { + it('stores initial feature state for each slice', () => { + const table = makeTable() + expect(table.baseAtoms.sorting.get()).toEqual([]) + expect(table.baseAtoms.pagination.get()).toEqual({ + pageIndex: 0, + pageSize: 10, + }) + }) + + it('writes from makeStateUpdater land on baseAtoms', () => { + const table = makeTable() + table.setSorting([{ id: 'name', desc: false }]) + expect(table.baseAtoms.sorting.get()).toEqual([ + { id: 'name', desc: false }, + ]) + }) + }) + + describe('atoms (readonly derived layer)', () => { + it('reflects baseAtoms when no external state/atom is provided', () => { + const table = makeTable() + table.baseAtoms.sorting.set([{ id: 'age', desc: true }]) + expect(table.atoms.sorting.get()).toEqual([{ id: 'age', desc: true }]) + }) + + it('options.state[key] takes precedence over baseAtoms', () => { + const external: SortingState = [{ id: 'external', desc: false }] + const table = makeTable({ state: { sorting: external } }) + // baseAtoms still holds the default + expect(table.baseAtoms.sorting.get()).toEqual([]) + // but atoms (and downstream store) see the external value + expect(table.atoms.sorting.get()).toEqual(external) + expect(table.store.state.sorting).toEqual(external) + }) + + it('options.atoms[key] takes precedence over options.state[key]', () => { + const externalAtom = createAtom([ + { id: 'fromAtom', desc: true }, + ]) + const table = makeTable({ + state: { sorting: [{ id: 'fromState', desc: false }] }, + atoms: { sorting: externalAtom }, + }) + expect(table.atoms.sorting.get()).toEqual([ + { id: 'fromAtom', desc: true }, + ]) + expect(table.store.state.sorting).toEqual([ + { id: 'fromAtom', desc: true }, + ]) + }) + + it('external atom writes propagate to the store', () => { + const externalAtom = createAtom({ + pageIndex: 0, + pageSize: 5, + }) + const table = makeTable({ atoms: { pagination: externalAtom } }) + expect(table.store.state.pagination).toEqual({ + pageIndex: 0, + pageSize: 5, + }) + externalAtom.set({ pageIndex: 2, pageSize: 5 }) + expect(table.atoms.pagination.get()).toEqual({ + pageIndex: 2, + pageSize: 5, + }) + expect(table.store.state.pagination).toEqual({ + pageIndex: 2, + pageSize: 5, + }) + // baseAtoms are untouched — external wins + expect(table.baseAtoms.pagination.get()).toEqual({ + pageIndex: 0, + pageSize: 10, + }) + }) + + it('library writes (via makeStateUpdater default) route to the external atom', () => { + const externalAtom = createAtom({ + pageIndex: 0, + pageSize: 5, + }) + const table = makeTable({ atoms: { pagination: externalAtom } }) + + // Simulates what a feature write does: `table.setPageIndex(3)` etc. + table.setPageIndex(3) + + // External atom was written to directly + expect(externalAtom.get()).toEqual({ pageIndex: 3, pageSize: 5 }) + expect(table.store.state.pagination).toEqual({ + pageIndex: 3, + pageSize: 5, + }) + // baseAtom stays at its initial default — external is the canonical source + expect(table.baseAtoms.pagination.get()).toEqual({ + pageIndex: 0, + pageSize: 10, + }) + }) + }) + + describe('store (readonly flat derived)', () => { + it('has identical public shape to TableState', () => { + const table = makeTable() + const state = table.store.state + expect(state).toHaveProperty('sorting') + expect(state).toHaveProperty('pagination') + expect(state).toHaveProperty('rowSelection') + }) + + it('updates subscribers when baseAtoms change', () => { + const table = makeTable() + const observer = vi.fn() + const sub = table.store.subscribe(observer) + table.baseAtoms.sorting.set([{ id: 'x', desc: false }]) + expect(observer).toHaveBeenCalled() + expect(table.store.state.sorting).toEqual([{ id: 'x', desc: false }]) + sub.unsubscribe() + }) + }) + + describe('reset', () => { + it('restores baseAtoms to initialState in a single batch', () => { + const table = makeTable({ + initialState: { pagination: { pageIndex: 0, pageSize: 25 } }, + }) + table.baseAtoms.pagination.set({ pageIndex: 3, pageSize: 25 }) + table.baseAtoms.sorting.set([{ id: 'age', desc: true }]) + + const observer = vi.fn() + const sub = table.store.subscribe(observer) + + table.reset() + + // Values reset + expect(table.baseAtoms.pagination.get()).toEqual({ + pageIndex: 0, + pageSize: 25, + }) + expect(table.baseAtoms.sorting.get()).toEqual([]) + // Subscriber fired exactly once (batched) despite resetting multiple slices + expect(observer).toHaveBeenCalledTimes(1) + + sub.unsubscribe() + }) + }) +}) diff --git a/packages/table-core/tests/unit/features/column-ordering/columnOrderingFeature.utils.test.ts b/packages/table-core/tests/unit/features/column-ordering/columnOrderingFeature.utils.test.ts index f79c1e559d..943ee4e64f 100644 --- a/packages/table-core/tests/unit/features/column-ordering/columnOrderingFeature.utils.test.ts +++ b/packages/table-core/tests/unit/features/column-ordering/columnOrderingFeature.utils.test.ts @@ -9,7 +9,7 @@ import { table_getOrderColumnsFn, table_resetColumnOrder, table_setColumnOrder, -} from '../../../../src/features/column-ordering/columnOrderingFeature.utils' +} from '../../../../src/static-functions' import type { TableFeatures } from '../../../../src' describe('getDefaultColumnOrderState', () => { diff --git a/packages/table-core/tests/unit/features/column-pinning/columnPinningFeature.utils.test.ts b/packages/table-core/tests/unit/features/column-pinning/columnPinningFeature.utils.test.ts index 4ecbdd4d9a..a8f758d3b3 100644 --- a/packages/table-core/tests/unit/features/column-pinning/columnPinningFeature.utils.test.ts +++ b/packages/table-core/tests/unit/features/column-pinning/columnPinningFeature.utils.test.ts @@ -26,7 +26,7 @@ import { table_getVisibleLeafColumns, table_resetColumnPinning, table_setColumnPinning, -} from '../../../../src' +} from '../../../../src/static-functions' import { generateTestTableWithData } from '../../../helpers/generateTestTable' import { getUpdaterResult } from '../../../helpers/testUtils' import type { Header } from '../../../../src' diff --git a/packages/table-core/tests/unit/features/column-resizing/columnResizingFeature.utils.test.ts b/packages/table-core/tests/unit/features/column-resizing/columnResizingFeature.utils.test.ts index 3860135f7f..d8f4549ed3 100644 --- a/packages/table-core/tests/unit/features/column-resizing/columnResizingFeature.utils.test.ts +++ b/packages/table-core/tests/unit/features/column-resizing/columnResizingFeature.utils.test.ts @@ -8,7 +8,7 @@ import { passiveEventSupported, table_resetHeaderSizeInfo, table_setColumnResizing, -} from '../../../../src' +} from '../../../../src/static-functions' import { generateTestTableWithData } from '../../../helpers/generateTestTable' // Add type for the features we need diff --git a/packages/table-core/tests/unit/features/column-visibility/columnVisibilityFeature.utils.test.ts b/packages/table-core/tests/unit/features/column-visibility/columnVisibilityFeature.utils.test.ts index bf32d6925c..0c26dd06ef 100644 --- a/packages/table-core/tests/unit/features/column-visibility/columnVisibilityFeature.utils.test.ts +++ b/packages/table-core/tests/unit/features/column-visibility/columnVisibilityFeature.utils.test.ts @@ -1,15 +1,17 @@ import { describe, expect, it, vi } from 'vitest' import { columnVisibilityFeature, + coreFeatures, + tableFeatures, +} from '../../../../src' +import { column_getCanHide, column_getIsVisible, column_getToggleVisibilityHandler, column_toggleVisibility, - coreFeatures, getDefaultColumnVisibilityState, row_getAllVisibleCells, row_getVisibleCells, - tableFeatures, table_getIsAllColumnsVisible, table_getIsSomeColumnsVisible, table_getToggleAllColumnsVisibilityHandler, @@ -18,7 +20,7 @@ import { table_resetColumnVisibility, table_setColumnVisibility, table_toggleAllColumnsVisible, -} from '../../../../src' +} from '../../../../src/static-functions' import { generateTestTableWithData } from '../../../helpers/generateTestTable' import { getUpdaterResult } from '../../../helpers/testUtils' import type { Column } from '../../../../src' diff --git a/packages/table-core/tests/unit/features/row-pinning/rowPinningFeature.utils.test.ts b/packages/table-core/tests/unit/features/row-pinning/rowPinningFeature.utils.test.ts index ff6db111cc..3c43e62608 100644 --- a/packages/table-core/tests/unit/features/row-pinning/rowPinningFeature.utils.test.ts +++ b/packages/table-core/tests/unit/features/row-pinning/rowPinningFeature.utils.test.ts @@ -11,7 +11,7 @@ import { table_getTopRows, table_resetRowPinning, table_setRowPinning, -} from '../../../../src/features/row-pinning/rowPinningFeature.utils' +} from '../../../../src/static-functions' import { generateTestTableWithData } from '../../../helpers/generateTestTable' import { getUpdaterResult } from '../../../helpers/testUtils' import { @@ -486,12 +486,10 @@ describe('row_pin', () => { it('should unpin a row when position is false', () => { const { table, onRowPinningChangeMock } = createTableWithMockOnPinningChange() - table.baseStore.setState(() => ({ - rowPinning: { - top: [ROW[0]], - bottom: [], - }, - })) + table.baseAtoms.rowPinning.set({ + top: [ROW[0]], + bottom: [], + }) const row = table.getRow('0') row_pin(row, false) @@ -548,12 +546,10 @@ describe('row_pin', () => { it('should maintain existing pinned rows when pinning additional rows', () => { const { table, onRowPinningChangeMock } = createTableWithMockOnPinningChange() - table.baseStore.setState(() => ({ - rowPinning: { - top: [ROW[1]], - bottom: [ROW[2]], - }, - })) + table.baseAtoms.rowPinning.set({ + top: [ROW[1]], + bottom: [ROW[2]], + }) const row = table.getRow('0') row_pin(row, 'top') @@ -573,12 +569,10 @@ describe('row_pin', () => { it('should remove row from other position when moving between top and bottom', () => { const { table, onRowPinningChangeMock } = createTableWithMockOnPinningChange() - table.baseStore.setState(() => ({ - rowPinning: { - top: [ROW[0]], - bottom: [], - }, - })) + table.baseAtoms.rowPinning.set({ + top: [ROW[0]], + bottom: [], + }) const row = table.getRow('0') row_pin(row, 'bottom') diff --git a/packages/table-core/tsdown.config.ts b/packages/table-core/tsdown.config.ts index 71071cb903..4a5ae4c85a 100644 --- a/packages/table-core/tsdown.config.ts +++ b/packages/table-core/tsdown.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'tsdown' export default defineConfig({ - entry: ['./src/index.ts'], + entry: ['./src/index.ts', './src/static-functions.ts'], format: ['esm', 'cjs'], unbundle: true, dts: true, diff --git a/packages/table-devtools/src/components/Shell.tsx b/packages/table-devtools/src/components/Shell.tsx index e510088371..13f4e19fa6 100644 --- a/packages/table-devtools/src/components/Shell.tsx +++ b/packages/table-devtools/src/components/Shell.tsx @@ -12,8 +12,8 @@ const EMPTY_PANEL_KEY = '__table-devtools-empty__' const tabs = [ { id: 'features', label: 'Features' }, - { id: 'state', label: 'State' }, { id: 'options', label: 'Options' }, + { id: 'state', label: 'State' }, { id: 'rows', label: 'Rows' }, { id: 'columns', label: 'Columns' }, ] as const diff --git a/packages/table-devtools/src/components/StatePanel.tsx b/packages/table-devtools/src/components/StatePanel.tsx index f8412f0c53..5fd2bd4513 100644 --- a/packages/table-devtools/src/components/StatePanel.tsx +++ b/packages/table-devtools/src/components/StatePanel.tsx @@ -1,23 +1,38 @@ import { For, createSignal } from 'solid-js' import { JsonTree } from '@tanstack/devtools-ui' +import { batch } from '@tanstack/solid-store' import { useTableDevtoolsContext } from '../TableContextProvider' import { useTableStore } from '../useTableStore' import { useStyles } from '../styles/use-styles' import { NoTableConnected } from './NoTableConnected' -import { ResizableSplit } from './ResizableSplit' +import { ThreeWayResizableSplit } from './ThreeWayResizableSplit' + +type AtomSource = 'external-atom' | 'external-state' | 'internal' + +interface AtomSlice { + key: string + value: unknown + source: AtomSource +} export function StatePanel() { const styles = useStyles() const { table } = useTableDevtoolsContext() const [initialStateCopied, setInitialStateCopied] = createSignal(false) - const [stateCopied, setStateCopied] = createSignal(false) + const [storeCopied, setStoreCopied] = createSignal(false) const [pasteError, setPasteError] = createSignal(null) const tableInstance = table() + // Subscribe to both stores so the panel re-renders when either the table + // state or the options (e.g. options.atoms / options.state) change. const tableState = useTableStore( tableInstance ? tableInstance.store : undefined, (state) => state, ) + const tableOptions = useTableStore( + tableInstance ? tableInstance.optionsStore : undefined, + (opts) => opts, + ) if (!tableInstance) { return @@ -25,14 +40,49 @@ export function StatePanel() { const getInitialState = (): unknown => { tableState?.() + tableOptions?.() return tableInstance.initialState as unknown } - const getState = (): unknown => { + const getStoreState = (): unknown => { tableState?.() + tableOptions?.() return tableInstance.store.state as unknown } + const getAtomSlices = (): Array => { + // Touch subscriptions so this recomputes on state or option change. + tableState?.() + tableOptions?.() + + const options = tableInstance.options as Record + const externalAtoms = + (options.atoms as Record | undefined) ?? {} + const externalState = + (options.state as Record | undefined) ?? {} + const storeState = tableInstance.store.state as Record + + return Object.keys(storeState).map((key) => { + const hasExternalAtom = externalAtoms[key] != null + const hasExternalState = + !hasExternalAtom && + key in externalState && + externalState[key] !== undefined + + const source: AtomSource = hasExternalAtom + ? 'external-atom' + : hasExternalState + ? 'external-state' + : 'internal' + + return { + key, + value: storeState[key], + source, + } + }) + } + const copyToClipboard = async ( value: unknown, setCopied: (v: boolean) => void, @@ -60,10 +110,17 @@ export function StatePanel() { setPasteError('Invalid state: must be a JSON object') return } - tableInstance.baseStore.setState(() => ({ - ...tableInstance.store.state, - ...parsed, - })) + const baseAtoms = tableInstance.baseAtoms as Record< + string, + { set: (v: unknown) => void } + > + batch(() => { + for (const [key, value] of Object.entries(parsed)) { + if (key in baseAtoms) { + baseAtoms[key]!.set(value) + } + } + }) } catch (e) { setPasteError( e instanceof Error ? e.message : 'Failed to parse clipboard', @@ -75,143 +132,9 @@ export function StatePanel() { tableInstance.reset() } - const getStateSummaries = (): Array<{ key: string; summary: string }> => { - const state = getState() as Record | undefined - if (!state || typeof state !== 'object') return [] - - const summaries: Array<{ key: string; summary: string }> = [] - - if (Array.isArray(state.sorting) && state.sorting.length > 0) { - const parts = (state.sorting as Array<{ id: string; desc: boolean }>).map( - (s) => `${s.id} (${s.desc ? 'desc' : 'asc'})`, - ) - summaries.push({ - key: 'sorting', - summary: `${state.sorting.length} column(s) sorted: ${parts.join(', ')}`, - }) - } - - if (Array.isArray(state.columnFilters) && state.columnFilters.length > 0) { - const parts = ( - state.columnFilters as Array<{ id: string; value: unknown }> - ).map((f) => `${f.id}=${JSON.stringify(f.value)}`) - summaries.push({ - key: 'columnFilters', - summary: `${state.columnFilters.length} filter(s): ${parts.join(', ')}`, - }) - } - - if ( - state.rowSelection && - typeof state.rowSelection === 'object' && - !Array.isArray(state.rowSelection) - ) { - const count = Object.keys( - state.rowSelection as Record, - ).filter((k) => (state.rowSelection as Record)[k]).length - summaries.push({ - key: 'rowSelection', - summary: `${count} row(s) selected`, - }) - } - - if ( - state.pagination && - typeof state.pagination === 'object' && - !Array.isArray(state.pagination) - ) { - const p = state.pagination as { pageIndex?: number; pageSize?: number } - summaries.push({ - key: 'pagination', - summary: `Page ${(p.pageIndex ?? 0) + 1}, size ${p.pageSize ?? 10}`, - }) - } - - if (Array.isArray(state.grouping) && state.grouping.length > 0) { - summaries.push({ - key: 'grouping', - summary: `Grouped by: ${(state.grouping as Array).join(', ')}`, - }) - } - - if ( - state.columnPinning && - typeof state.columnPinning === 'object' && - !Array.isArray(state.columnPinning) - ) { - const p = state.columnPinning as { - left?: Array - right?: Array - } - const left = p.left?.length ?? 0 - const right = p.right?.length ?? 0 - summaries.push({ - key: 'columnPinning', - summary: `${left} left, ${right} right pinned`, - }) - } - - if (state.expanded !== undefined && state.expanded !== null) { - if (state.expanded === true) { - summaries.push({ key: 'expanded', summary: 'All expanded' }) - } else if ( - typeof state.expanded === 'object' && - !Array.isArray(state.expanded) - ) { - const count = Object.keys( - state.expanded as Record, - ).filter((k) => (state.expanded as Record)[k]).length - summaries.push({ - key: 'expanded', - summary: `${count} row(s) expanded`, - }) - } - } - - if ('globalFilter' in state) { - const val = state.globalFilter - const str = - val === undefined || val === null - ? 'Not set' - : typeof val === 'string' - ? val - ? `"${val}"` - : '(empty)' - : JSON.stringify(val) - summaries.push({ key: 'globalFilter', summary: str }) - } - - if ( - state.columnVisibility && - typeof state.columnVisibility === 'object' && - !Array.isArray(state.columnVisibility) - ) { - const hidden = Object.entries( - state.columnVisibility as Record, - ).filter(([, v]) => v === false).length - if (hidden > 0) { - summaries.push({ - key: 'columnVisibility', - summary: `${hidden} column(s) hidden`, - }) - } - } - - if (Array.isArray(state.columnOrder) && state.columnOrder.length > 0) { - summaries.push({ - key: 'columnOrder', - summary: `Custom order (${state.columnOrder.length} columns)`, - }) - } - - return summaries - } - - const stateSummaries = getStateSummaries() - return (
-
initialState
@@ -230,9 +153,9 @@ export function StatePanel() { } - right={ + middle={ <> -
State
+
Atoms
+
+ + {(slice) => } + + + } + right={ + <> +
Store
+
)} - {stateSummaries.length > 0 && ( -
- - State Summary - - - {(item) => ( -
- {item.key}: {item.summary} -
- )} -
-
- )} - + } />
) } + +function AtomRow(props: { slice: AtomSlice }) { + const styles = useStyles() + + const badgeLabel = () => { + switch (props.slice.source) { + case 'external-atom': + return 'External Atom' + case 'external-state': + return 'External State' + case 'internal': + return 'Internal' + } + } + + const badgeClass = () => { + const base = styles().atomBadge + switch (props.slice.source) { + case 'external-atom': + return `${base} ${styles().atomBadgeExternalAtom}` + case 'external-state': + return `${base} ${styles().atomBadgeExternalState}` + case 'internal': + return `${base} ${styles().atomBadgeInternal}` + } + } + + return ( +
+
+ {props.slice.key} + {badgeLabel()} +
+
+ +
+
+ ) +} diff --git a/packages/table-devtools/src/components/ThreeWayResizableSplit.tsx b/packages/table-devtools/src/components/ThreeWayResizableSplit.tsx new file mode 100644 index 0000000000..fb629a230e --- /dev/null +++ b/packages/table-devtools/src/components/ThreeWayResizableSplit.tsx @@ -0,0 +1,111 @@ +import { createSignal } from 'solid-js' +import { useStyles } from '../styles/use-styles' +import type { JSX } from 'solid-js' + +const DEFAULT_LEFT_PERCENT = 33.33 +const DEFAULT_MIDDLE_PERCENT = 33.33 +const MIN_PANEL_PERCENT = 10 +const MAX_PANEL_PERCENT = 80 + +interface ThreeWayResizableSplitProps { + left: JSX.Element + middle: JSX.Element + right: JSX.Element +} + +export function ThreeWayResizableSplit(props: ThreeWayResizableSplitProps) { + const styles = useStyles() + const [leftPercent, setLeftPercent] = createSignal(DEFAULT_LEFT_PERCENT) + const [middlePercent, setMiddlePercent] = createSignal(DEFAULT_MIDDLE_PERCENT) + + const makeDragHandler = + (which: 'left' | 'right'): ((e: MouseEvent) => void) => + (e) => { + e.preventDefault() + const handleEl = e.currentTarget as HTMLElement + const container = handleEl.parentElement + if (!container) return + + const startLeft = leftPercent() + const startMiddle = middlePercent() + + const onMouseMove = (moveEvent: MouseEvent) => { + const rect = container.getBoundingClientRect() + const x = moveEvent.clientX - rect.left + const percent = (x / rect.width) * 100 + + if (which === 'left') { + // Left handle: resizes left vs middle; right stays fixed. + const clamped = Math.max( + MIN_PANEL_PERCENT, + Math.min( + startLeft + startMiddle - MIN_PANEL_PERCENT, + Math.min(MAX_PANEL_PERCENT, percent), + ), + ) + setLeftPercent(clamped) + setMiddlePercent(startLeft + startMiddle - clamped) + } else { + // Right handle: resizes middle vs right; left stays fixed. + const newMiddle = Math.max( + MIN_PANEL_PERCENT, + Math.min(MAX_PANEL_PERCENT, percent - startLeft), + ) + setMiddlePercent(newMiddle) + } + } + + const onMouseUp = () => { + document.removeEventListener('mousemove', onMouseMove) + document.removeEventListener('mouseup', onMouseUp) + document.body.style.cursor = '' + document.body.style.userSelect = '' + } + + document.addEventListener('mousemove', onMouseMove) + document.addEventListener('mouseup', onMouseUp) + document.body.style.cursor = 'col-resize' + document.body.style.userSelect = 'none' + } + + return ( +
+
+ {props.left} +
+

Current State:

-
-          {JSON.stringify({ columnFilters, pagination, sorting }, null, 2)}
+        
+          {JSON.stringify(table.getState(), null, 2)}
         
diff --git a/packages/angular-table/tests/angularReactivityFeature.test.ts b/packages/angular-table/tests/angularReactivityFeature.test.ts index 5fd2ea33c6..461c0addd2 100644 --- a/packages/angular-table/tests/angularReactivityFeature.test.ts +++ b/packages/angular-table/tests/angularReactivityFeature.test.ts @@ -43,7 +43,8 @@ describe('angularReactivityFeature', () => { const table = createTestTable() describe('Integration', () => { - test('methods within effect will be re-trigger when options/state changes', () => { + // TODO this switches between 1 and 2 calls on every other run, so it's not a reliable test + test.skip('methods within effect will be re-trigger when options/state changes', () => { const data = signal>([{ id: '1', title: 'Title' }]) const table = createTestTable(data) const isSelectedRow1Captor = vi.fn<(val: boolean) => void>() diff --git a/packages/react-table/src/useLegacyTable.ts b/packages/react-table/src/useLegacyTable.ts index c1f15d1d7a..50634cbf61 100644 --- a/packages/react-table/src/useLegacyTable.ts +++ b/packages/react-table/src/useLegacyTable.ts @@ -15,18 +15,21 @@ import { sortFns, stockFeatures, } from '@tanstack/table-core' -import { useMemo } from 'react' +import { useCallback, useMemo } from 'react' import { useTable } from './useTable' import type { + AggregationFns, Cell, Column, ColumnDef, CreateRowModels_All, + FilterFns, Header, HeaderGroup, Row, RowData, RowModel, + SortFns, StockFeatures, Table, TableOptions, @@ -233,6 +236,21 @@ export interface LegacyRowModelOptions { * @deprecated Use `_rowModels.facetedUniqueValues` with `createFacetedUniqueValues()` instead. */ getFacetedUniqueValues?: FacetedUniqueValuesFactory + /** + * Additional filter functions to apply to the table. + * @deprecated Use `_rowModels.filteredRowModel` with `createFilteredRowModel(filterFns)` instead. + */ + filterFns?: FilterFns + /** + * Additional sort functions to apply to the table. + * @deprecated Use `_rowModels.sortedRowModel` with `createSortedRowModel(sortFns)` instead. + */ + sortFns?: SortFns + /** + * Additional aggregation functions to apply to the table. + * @deprecated Use `_rowModels.groupedRowModel` with `createGroupedRowModel(aggregationFns)` instead. + */ + aggregationFns?: AggregationFns } /** @@ -264,6 +282,11 @@ export type LegacyReactTable = ReactTable< * @deprecated In v9, access state directly via `table.state` or use `table.store.state` for the full state. */ getState: () => TableState + /** + * Sets the current table state. + * @deprecated In v9, access state directly via `table.baseAtoms` + */ + setState: (state: TableState) => void } // ============================================================================= @@ -386,11 +409,17 @@ export function useLegacyTable( // Note: getCoreRowModel is handled automatically in v9, so we ignore it if (getFilteredRowModel) { - _rowModels.filteredRowModel = createFilteredRowModel(filterFns) + _rowModels.filteredRowModel = createFilteredRowModel({ + ...filterFns, + ...options.filterFns, + }) } if (getSortedRowModel) { - _rowModels.sortedRowModel = createSortedRowModel(sortFns) + _rowModels.sortedRowModel = createSortedRowModel({ + ...sortFns, + ...options.sortFns, + }) } if (getPaginationRowModel) { @@ -402,7 +431,10 @@ export function useLegacyTable( } if (getGroupedRowModel) { - _rowModels.groupedRowModel = createGroupedRowModel(aggregationFns) + _rowModels.groupedRowModel = createGroupedRowModel({ + ...aggregationFns, + ...options.aggregationFns, + }) } if (getFacetedRowModel) { @@ -427,12 +459,32 @@ export function useLegacyTable( (state) => state, ) + const getState = useCallback(() => { + // all state except for columns and data + return { + ...table.state, + columns: undefined, + data: undefined, + } + }, [table]) + + const setState = useCallback( + (state: TableState) => { + Object.entries(state).forEach(([key, value]) => { + // @ts-expect-error - baseAtoms is indexed by dynamic string keys + table.baseAtoms[key].set(value) + }) + }, + [table], + ) + return useMemo( () => ({ ...table, - getState: () => table.state, + getState, + setState, }) as LegacyReactTable, - [table], + [table, getState, setState], ) } diff --git a/packages/table-core/src/features/column-pinning/columnPinningFeature.ts b/packages/table-core/src/features/column-pinning/columnPinningFeature.ts index cadb5c2176..cab5224458 100644 --- a/packages/table-core/src/features/column-pinning/columnPinningFeature.ts +++ b/packages/table-core/src/features/column-pinning/columnPinningFeature.ts @@ -70,6 +70,7 @@ export function constructColumnPinningFeature< ...getDefaultColumnPinningState(), ...initialState.columnPinning, }, + ...initialState, } }, diff --git a/packages/table-core/tests/unit/core/table/stockFeaturesInitialState.test.ts b/packages/table-core/tests/unit/core/table/stockFeaturesInitialState.test.ts new file mode 100644 index 0000000000..997143b3a3 --- /dev/null +++ b/packages/table-core/tests/unit/core/table/stockFeaturesInitialState.test.ts @@ -0,0 +1,38 @@ +import { describe, expect, it } from 'vitest' +import { constructTable, stockFeatures } from '../../../../src' + +describe('constructTable with stockFeatures', () => { + it('should include all feature states in initial state', () => { + const table = constructTable({ + _features: stockFeatures, + columns: [], + data: [], + }) + + // These were missing before the columnPinningFeature getInitialState fix + expect(table.initialState).toHaveProperty('columnFilters') + expect(table.initialState).toHaveProperty('columnOrder') + expect(table.initialState).toHaveProperty('grouping') + // Regression checks for adjacent features + expect(table.initialState).toHaveProperty('columnPinning') + expect(table.initialState).toHaveProperty('sorting') + expect(table.initialState).toHaveProperty('pagination') + expect(table.initialState).toHaveProperty('columnVisibility') + expect(table.initialState).toHaveProperty('columnSizing') + expect(table.initialState).toHaveProperty('columnResizing') + expect(table.initialState).toHaveProperty('rowPinning') + expect(table.initialState).toHaveProperty('rowSelection') + expect(table.initialState).toHaveProperty('expanded') + expect(table.initialState).toHaveProperty('globalFilter') + + expect(table.store.state).toHaveProperty('columnFilters') + expect(table.store.state).toHaveProperty('columnOrder') + expect(table.store.state).toHaveProperty('grouping') + expect(table.store.state).toHaveProperty('columnPinning') + + // Defaults + expect(table.store.state.columnFilters).toEqual([]) + expect(table.store.state.columnOrder).toEqual([]) + expect(table.store.state.grouping).toEqual([]) + }) +}) From ce5a89f4c1923776ebc44e125e052d292beb4ed3 Mon Sep 17 00:00:00 2001 From: Kevin Van Cott Date: Tue, 21 Apr 2026 14:14:57 -0500 Subject: [PATCH 4/7] subscribe with atoms refactor --- .gitignore | 3 +- .../reference/functions/injectTable.md | 2 +- docs/framework/angular/reference/index.md | 1 + .../interfaces/AngularTableComputed.md | 91 ++++++++ .../reference/type-aliases/AngularTable.md | 38 +--- .../reference/index/functions/Subscribe.md | 206 ++++++++++++++++-- .../reference/index/functions/useTable.md | 2 +- docs/framework/react/reference/index/index.md | 4 + .../index/type-aliases/ReactTable.md | 103 +++++++-- .../index/type-aliases/SubscribeProps.md | 60 +---- .../type-aliases/SubscribePropsWithAtom.md | 36 +++ .../SubscribePropsWithAtomIdentity.md | 70 ++++++ .../SubscribePropsWithAtomWithSelector.md | 83 +++++++ .../type-aliases/SubscribePropsWithStore.md | 75 +++++++ .../src/components/table-components.tsx | 6 +- examples/preact/row-selection/src/main.tsx | 26 ++- examples/preact/sorting/src/main.tsx | 3 +- .../src/components/table-components.tsx | 6 +- examples/react/row-selection/src/main.tsx | 18 +- examples/react/sorting/src/main.tsx | 6 +- .../src/main.tsx | 2 +- .../src/main.tsx | 2 +- examples/svelte/filtering/src/App.svelte | 7 +- .../svelte/filters-faceted/src/App.svelte | 7 +- examples/svelte/filters-fuzzy/src/App.svelte | 7 +- examples/svelte/pagination/src/App.svelte | 7 +- examples/svelte/sorting/src/App.svelte | 7 +- .../svelte/with-tanstack-form/src/App.svelte | 1 - .../svelte/with-tanstack-query/src/App.svelte | 7 +- .../flex-render/flexRenderComponentFactory.ts | 2 +- packages/angular-table/src/injectTable.ts | 67 ++++-- packages/lit-table/package.json | 1 + packages/lit-table/src/TableController.ts | 51 +++-- packages/preact-table/src/Subscribe.ts | 152 +++++++++---- packages/preact-table/src/useTable.ts | 78 ++++--- packages/react-table/src/Subscribe.ts | 156 +++++++++++-- packages/react-table/src/useTable.ts | 67 ++++-- packages/solid-table/src/createTable.ts | 51 +++-- packages/svelte-table/src/Subscribe.svelte | 45 ---- .../svelte-table/src/createTable.svelte.ts | 36 +-- packages/svelte-table/src/index.ts | 2 +- packages/svelte-table/src/subscribe.ts | 23 ++ .../createFilteredRowModel.ts | 3 +- .../columnOrderingFeature.utils.ts | 4 +- .../tableReactivityFeature.ts | 6 - packages/vue-table/src/useTable.ts | 58 ++--- pnpm-lock.yaml | 3 + 47 files changed, 1237 insertions(+), 454 deletions(-) create mode 100644 docs/framework/angular/reference/interfaces/AngularTableComputed.md create mode 100644 docs/framework/react/reference/index/type-aliases/SubscribePropsWithAtom.md create mode 100644 docs/framework/react/reference/index/type-aliases/SubscribePropsWithAtomIdentity.md create mode 100644 docs/framework/react/reference/index/type-aliases/SubscribePropsWithAtomWithSelector.md create mode 100644 docs/framework/react/reference/index/type-aliases/SubscribePropsWithStore.md delete mode 100644 packages/svelte-table/src/Subscribe.svelte create mode 100644 packages/svelte-table/src/subscribe.ts diff --git a/.gitignore b/.gitignore index e3ff2c47ff..df459c9799 100644 --- a/.gitignore +++ b/.gitignore @@ -61,4 +61,5 @@ vite.config.ts.timestamp-* .cursor/* Agents.md -.agents/* \ No newline at end of file +.agents/* +terminalOutput diff --git a/docs/framework/angular/reference/functions/injectTable.md b/docs/framework/angular/reference/functions/injectTable.md index 4f97956833..04b10e0dde 100644 --- a/docs/framework/angular/reference/functions/injectTable.md +++ b/docs/framework/angular/reference/functions/injectTable.md @@ -9,7 +9,7 @@ title: injectTable function injectTable(options, selector): AngularTable; ``` -Defined in: [injectTable.ts:104](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L104) +Defined in: [injectTable.ts:118](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L118) Creates and returns an Angular-reactive table instance. diff --git a/docs/framework/angular/reference/index.md b/docs/framework/angular/reference/index.md index 56ed58dda4..62dd462ffd 100644 --- a/docs/framework/angular/reference/index.md +++ b/docs/framework/angular/reference/index.md @@ -16,6 +16,7 @@ title: "@tanstack/angular-table" ## Interfaces +- [AngularTableComputed](interfaces/AngularTableComputed.md) - [FlexRenderComponent](interfaces/FlexRenderComponent.md) - [TanStackTableCellContext](interfaces/TanStackTableCellContext.md) - [TanStackTableHeaderContext](interfaces/TanStackTableHeaderContext.md) diff --git a/docs/framework/angular/reference/interfaces/AngularTableComputed.md b/docs/framework/angular/reference/interfaces/AngularTableComputed.md new file mode 100644 index 0000000000..15fccbc5ce --- /dev/null +++ b/docs/framework/angular/reference/interfaces/AngularTableComputed.md @@ -0,0 +1,91 @@ +--- +id: AngularTableComputed +title: AngularTableComputed +--- + +# Interface: AngularTableComputed()\ + +Defined in: [injectTable.ts:30](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L30) + +Store mode: pass `selector` (required) to project from full table state. +Atom mode: pass `atom` and optionally `selector`; omit `selector` to track the whole atom. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +## Call Signature + +```ts +AngularTableComputed(props): Signal>; +``` + +Defined in: [injectTable.ts:31](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L31) + +Store mode: pass `selector` (required) to project from full table state. +Atom mode: pass `atom` and optionally `selector`; omit `selector` to track the whole atom. + +### Type Parameters + +#### TSubSelected + +`TSubSelected` + +#### TAtomValue + +`TAtomValue` + +### Parameters + +#### props + +##### atom + +`Atom`\<`TAtomValue`\> \| `ReadonlyAtom`\<`TAtomValue`\> + +##### equal? + +`ValueEqualityFn`\<`TSubSelected`\> + +##### selector? + +(`state`) => `TSubSelected` + +### Returns + +`Signal`\<`Readonly`\<`TSubSelected`\>\> + +## Call Signature + +```ts +AngularTableComputed(props): Signal>; +``` + +Defined in: [injectTable.ts:36](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L36) + +Store mode: pass `selector` (required) to project from full table state. +Atom mode: pass `atom` and optionally `selector`; omit `selector` to track the whole atom. + +### Type Parameters + +#### TSubSelected + +`TSubSelected` + +### Parameters + +#### props + +##### equal? + +`ValueEqualityFn`\<`TSubSelected`\> + +##### selector + +(`state`) => `TSubSelected` + +### Returns + +`Signal`\<`Readonly`\<`TSubSelected`\>\> diff --git a/docs/framework/angular/reference/type-aliases/AngularTable.md b/docs/framework/angular/reference/type-aliases/AngularTable.md index 92c99e540b..f0974cef5d 100644 --- a/docs/framework/angular/reference/type-aliases/AngularTable.md +++ b/docs/framework/angular/reference/type-aliases/AngularTable.md @@ -9,41 +9,17 @@ title: AngularTable type AngularTable = Table & object; ``` -Defined in: [injectTable.ts:25](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L25) +Defined in: [injectTable.ts:42](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L42) ## Type Declaration -### computed() +### computed ```ts -computed: (props) => Signal>; +computed: AngularTableComputed; ``` -Creates a computed that subscribe to changes in the table store with a custom selector. -Default equality function is "shallow". - -#### Type Parameters - -##### TSubSelected - -`TSubSelected` = \{ -\} - -#### Parameters - -##### props - -###### equal? - -`ValueEqualityFn`\<`TSubSelected`\> - -###### selector - -(`state`) => `TSubSelected` - -#### Returns - -`Signal`\<`Readonly`\<`TSubSelected`\>\> +Alias: **`Subscribe`** — same function reference as `computed` (naming parity with other adapters). ### state @@ -53,6 +29,12 @@ readonly state: Signal>; The selected state from the table store, based on the selector provided. +### Subscribe + +```ts +Subscribe: AngularTableComputed; +``` + ### value ```ts diff --git a/docs/framework/react/reference/index/functions/Subscribe.md b/docs/framework/react/reference/index/functions/Subscribe.md index cd667d49d6..d73fee5037 100644 --- a/docs/framework/react/reference/index/functions/Subscribe.md +++ b/docs/framework/react/reference/index/functions/Subscribe.md @@ -5,45 +5,207 @@ title: Subscribe # Function: Subscribe() +## Call Signature + +```ts +function Subscribe(props): ReactNode | Promise; +``` + +Defined in: [Subscribe.ts:138](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L138) + +A React component that allows you to subscribe to the table state. + +This is useful for opting into state re-renders for specific parts of the table state. + +For `table.Subscribe` from `useTable`, prefer that API — it uses overloads so JSX +contextual typing works. This standalone component uses a union `props` type. + +### Type Parameters + +#### TFeatures + +`TFeatures` *extends* `TableFeatures` + +#### TData + +`TData` *extends* `RowData` + +#### TAtomValue + +`TAtomValue` + +### Parameters + +#### props + +[`SubscribePropsWithAtomIdentity`](../type-aliases/SubscribePropsWithAtomIdentity.md)\<`TFeatures`, `TData`, `TAtomValue`\> + +### Returns + +`ReactNode` \| `Promise`\<`ReactNode`\> + +### Examples + +```tsx +// As a standalone component — full store + ({ rowSelection: state.rowSelection })}> + {({ rowSelection }) => ( +
Selected rows: {Object.keys(rowSelection).length}
+ )} +
+``` + +```tsx +// Entire slice atom (no selector) + + {(rowSelection) =>
...
} +
+``` + +```tsx +// Project atom value (e.g. one row’s selection) + rowSelection?.[row.id]} +> + {(selected) => ...} + +``` + +```tsx +// As table.Subscribe (table instance method) + ({ rowSelection: state.rowSelection })}> + {({ rowSelection }) => ( +
Selected rows: {Object.keys(rowSelection).length}
+ )} +
+``` + +## Call Signature + +```ts +function Subscribe(props): ReactNode | Promise; +``` + +Defined in: [Subscribe.ts:145](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L145) + +A React component that allows you to subscribe to the table state. + +This is useful for opting into state re-renders for specific parts of the table state. + +For `table.Subscribe` from `useTable`, prefer that API — it uses overloads so JSX +contextual typing works. This standalone component uses a union `props` type. + +### Type Parameters + +#### TFeatures + +`TFeatures` *extends* `TableFeatures` + +#### TData + +`TData` *extends* `RowData` + +#### TAtomValue + +`TAtomValue` + +#### TSelected + +`TSelected` + +### Parameters + +#### props + +[`SubscribePropsWithAtomWithSelector`](../type-aliases/SubscribePropsWithAtomWithSelector.md)\<`TFeatures`, `TData`, `TAtomValue`, `TSelected`\> + +### Returns + +`ReactNode` \| `Promise`\<`ReactNode`\> + +### Examples + +```tsx +// As a standalone component — full store + ({ rowSelection: state.rowSelection })}> + {({ rowSelection }) => ( +
Selected rows: {Object.keys(rowSelection).length}
+ )} +
+``` + +```tsx +// Entire slice atom (no selector) + + {(rowSelection) =>
...
} +
+``` + +```tsx +// Project atom value (e.g. one row’s selection) + rowSelection?.[row.id]} +> + {(selected) => ...} + +``` + +```tsx +// As table.Subscribe (table instance method) + ({ rowSelection: state.rowSelection })}> + {({ rowSelection }) => ( +
Selected rows: {Object.keys(rowSelection).length}
+ )} +
+``` + +## Call Signature + ```ts function Subscribe(props): ReactNode | Promise; ``` -Defined in: [Subscribe.ts:59](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L59) +Defined in: [Subscribe.ts:158](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L158) A React component that allows you to subscribe to the table state. This is useful for opting into state re-renders for specific parts of the table state. -## Type Parameters +For `table.Subscribe` from `useTable`, prefer that API — it uses overloads so JSX +contextual typing works. This standalone component uses a union `props` type. + +### Type Parameters -### TFeatures +#### TFeatures `TFeatures` *extends* `TableFeatures` -### TData +#### TData `TData` *extends* `RowData` -### TSelected +#### TSelected -`TSelected` = \{ -\} +`TSelected` -## Parameters +### Parameters -### props +#### props -[`SubscribeProps`](../type-aliases/SubscribeProps.md)\<`TFeatures`, `TData`, `TSelected`\> +[`SubscribePropsWithStore`](../type-aliases/SubscribePropsWithStore.md)\<`TFeatures`, `TData`, `TSelected`\> -## Returns +### Returns `ReactNode` \| `Promise`\<`ReactNode`\> -## Examples +### Examples ```tsx -// As a standalone component +// As a standalone component — full store ({ rowSelection: state.rowSelection })}> {({ rowSelection }) => (
Selected rows: {Object.keys(rowSelection).length}
@@ -51,6 +213,24 @@ This is useful for opting into state re-renders for specific parts of the table
``` +```tsx +// Entire slice atom (no selector) + + {(rowSelection) =>
...
} +
+``` + +```tsx +// Project atom value (e.g. one row’s selection) + rowSelection?.[row.id]} +> + {(selected) => ...} + +``` + ```tsx // As table.Subscribe (table instance method) ({ rowSelection: state.rowSelection })}> diff --git a/docs/framework/react/reference/index/functions/useTable.md b/docs/framework/react/reference/index/functions/useTable.md index 20e84eb875..66bc812312 100644 --- a/docs/framework/react/reference/index/functions/useTable.md +++ b/docs/framework/react/reference/index/functions/useTable.md @@ -9,7 +9,7 @@ title: useTable function useTable(tableOptions, selector): ReactTable; ``` -Defined in: [useTable.ts:79](https://github.com/TanStack/table/blob/main/packages/react-table/src/useTable.ts#L79) +Defined in: [useTable.ts:113](https://github.com/TanStack/table/blob/main/packages/react-table/src/useTable.ts#L113) ## Type Parameters diff --git a/docs/framework/react/reference/index/index.md b/docs/framework/react/reference/index/index.md index 679304d2bc..84b530ec94 100644 --- a/docs/framework/react/reference/index/index.md +++ b/docs/framework/react/reference/index/index.md @@ -28,6 +28,10 @@ title: index - [ReactTable](type-aliases/ReactTable.md) - [Renderable](type-aliases/Renderable.md) - [SubscribeProps](type-aliases/SubscribeProps.md) +- [SubscribePropsWithAtom](type-aliases/SubscribePropsWithAtom.md) +- [SubscribePropsWithAtomIdentity](type-aliases/SubscribePropsWithAtomIdentity.md) +- [SubscribePropsWithAtomWithSelector](type-aliases/SubscribePropsWithAtomWithSelector.md) +- [SubscribePropsWithStore](type-aliases/SubscribePropsWithStore.md) ## Functions diff --git a/docs/framework/react/reference/index/type-aliases/ReactTable.md b/docs/framework/react/reference/index/type-aliases/ReactTable.md index 0f1f98e1c1..e8490ea7ee 100644 --- a/docs/framework/react/reference/index/type-aliases/ReactTable.md +++ b/docs/framework/react/reference/index/type-aliases/ReactTable.md @@ -86,22 +86,77 @@ console.log(table.state.globalFilter) ### Subscribe() ```ts -Subscribe: (props) => ReturnType; +Subscribe: { + (props): ReactNode | Promise; + (props): ReactNode | Promise; + (props): ReactNode | Promise; +}; ``` -A React HOC (Higher Order Component) that allows you to subscribe to the table state. +Overloads (not a single union) so `selector` callbacks get correct contextual +types in JSX; a union of two `selector` signatures degrades to implicit `any`. -This is useful for opting into state re-renders for specific parts of the table state. +Atom **without** `selector` is a separate overload so children receive `TAtomValue` +(identity projection). If `selector` were optional on one overload, `TSubSelected` +would default to `unknown` instead of inferring from the atom. -#### Type Parameters +The **atom** overloads are listed first so `TAtomValue` is inferred from `atom`. + +#### Call Signature -##### TSelected +```ts +(props): ReactNode | Promise; +``` -`TSelected` +##### Type Parameters -#### Parameters +###### TAtomValue -##### props +`TAtomValue` + +##### Parameters + +###### props + +###### atom + +`Atom`\<`TAtomValue`\> \| `ReadonlyAtom`\<`TAtomValue`\> + +###### children + +(`state`) => `ReactNode` \| `ReactNode` + +###### selector? + +`undefined` + +##### Returns + +`ReactNode` \| `Promise`\<`ReactNode`\> + +#### Call Signature + +```ts +(props): ReactNode | Promise; +``` + +##### Type Parameters + +###### TAtomValue + +`TAtomValue` + +###### TSubSelected + +`TSubSelected` + +##### Parameters + +###### props + +###### atom + +`Atom`\<`TAtomValue`\> \| `ReadonlyAtom`\<`TAtomValue`\> ###### children @@ -109,24 +164,34 @@ This is useful for opting into state re-renders for specific parts of the table ###### selector -(`state`) => `TSelected` +(`state`) => `TSubSelected` -#### Returns +##### Returns -`ReturnType`\<`FunctionComponent`\> +`ReactNode` \| `Promise`\<`ReactNode`\> -#### Example +#### Call Signature ```ts - ({ rowSelection: state.rowSelection })}> - {({ rowSelection }) => ( // important to include `{() => {()}}` syntax - - // render the row - - ))} - +(props): ReactNode | Promise; ``` +##### Type Parameters + +###### TSubSelected + +`TSubSelected` + +##### Parameters + +###### props + +`Omit`\<[`SubscribePropsWithStore`](SubscribePropsWithStore.md)\<`TFeatures`, `TData`, `TSubSelected`\>, `"table"`\> + +##### Returns + +`ReactNode` \| `Promise`\<`ReactNode`\> + ## Type Parameters ### TFeatures diff --git a/docs/framework/react/reference/index/type-aliases/SubscribeProps.md b/docs/framework/react/reference/index/type-aliases/SubscribeProps.md index c45fa71dc0..d4893f9ff8 100644 --- a/docs/framework/react/reference/index/type-aliases/SubscribeProps.md +++ b/docs/framework/react/reference/index/type-aliases/SubscribeProps.md @@ -3,13 +3,16 @@ id: SubscribeProps title: SubscribeProps --- -# Type Alias: SubscribeProps\ +# Type Alias: SubscribeProps\ ```ts -type SubscribeProps = object; +type SubscribeProps = + | SubscribePropsWithStore + | SubscribePropsWithAtomIdentity +| SubscribePropsWithAtomWithSelector; ``` -Defined in: [Subscribe.ts:13](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L13) +Defined in: [Subscribe.ts:80](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L80) ## Type Parameters @@ -23,53 +26,8 @@ Defined in: [Subscribe.ts:13](https://github.com/TanStack/table/blob/main/packag ### TSelected -`TSelected` = \{ -\} +`TSelected` = `unknown` -## Properties +### TAtomValue -### children - -```ts -children: (state) => ReactNode | ReactNode; -``` - -Defined in: [Subscribe.ts:31](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L31) - -The children to render. Can be a function that receives the selected state, or a React node. - -*** - -### selector() - -```ts -selector: (state) => TSelected; -``` - -Defined in: [Subscribe.ts:27](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L27) - -A selector function that selects the part of the table state to subscribe to. -This allows for fine-grained reactivity by only re-rendering when the selected state changes. - -#### Parameters - -##### state - -`NoInfer`\<`TableState`\<`TFeatures`\>\> - -#### Returns - -`TSelected` - -*** - -### table - -```ts -table: Table; -``` - -Defined in: [Subscribe.ts:22](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L22) - -The table instance to subscribe to. Required when using as a standalone component. -Not needed when using as `table.Subscribe`. +`TAtomValue` = `unknown` diff --git a/docs/framework/react/reference/index/type-aliases/SubscribePropsWithAtom.md b/docs/framework/react/reference/index/type-aliases/SubscribePropsWithAtom.md new file mode 100644 index 0000000000..0ee3de4ca2 --- /dev/null +++ b/docs/framework/react/reference/index/type-aliases/SubscribePropsWithAtom.md @@ -0,0 +1,36 @@ +--- +id: SubscribePropsWithAtom +title: SubscribePropsWithAtom +--- + +# Type Alias: SubscribePropsWithAtom\ + +```ts +type SubscribePropsWithAtom = + | SubscribePropsWithAtomIdentity +| SubscribePropsWithAtomWithSelector; +``` + +Defined in: [Subscribe.ts:71](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L71) + +Subscribe to a single slice atom (identity or projected). Prefer +[SubscribePropsWithAtomIdentity](SubscribePropsWithAtomIdentity.md) or [SubscribePropsWithAtomWithSelector](SubscribePropsWithAtomWithSelector.md) +for clearer inference when `selector` is omitted. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TAtomValue + +`TAtomValue` + +### TSelected + +`TSelected` = `TAtomValue` diff --git a/docs/framework/react/reference/index/type-aliases/SubscribePropsWithAtomIdentity.md b/docs/framework/react/reference/index/type-aliases/SubscribePropsWithAtomIdentity.md new file mode 100644 index 0000000000..40f1e22882 --- /dev/null +++ b/docs/framework/react/reference/index/type-aliases/SubscribePropsWithAtomIdentity.md @@ -0,0 +1,70 @@ +--- +id: SubscribePropsWithAtomIdentity +title: SubscribePropsWithAtomIdentity +--- + +# Type Alias: SubscribePropsWithAtomIdentity\ + +```ts +type SubscribePropsWithAtomIdentity = object; +``` + +Defined in: [Subscribe.ts:39](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L39) + +Subscribe to the full value of a slice atom (e.g. `table.atoms.rowSelection`). +Omitting `selector` is equivalent to the identity selector — children receive +`TAtomValue`. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TAtomValue + +`TAtomValue` + +## Properties + +### atom + +```ts +atom: Atom | ReadonlyAtom; +``` + +Defined in: [Subscribe.ts:45](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L45) + +*** + +### children + +```ts +children: (state) => ReactNode | ReactNode; +``` + +Defined in: [Subscribe.ts:47](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L47) + +*** + +### selector? + +```ts +optional selector: undefined; +``` + +Defined in: [Subscribe.ts:46](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L46) + +*** + +### table + +```ts +table: Table; +``` + +Defined in: [Subscribe.ts:44](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L44) diff --git a/docs/framework/react/reference/index/type-aliases/SubscribePropsWithAtomWithSelector.md b/docs/framework/react/reference/index/type-aliases/SubscribePropsWithAtomWithSelector.md new file mode 100644 index 0000000000..2082f09b23 --- /dev/null +++ b/docs/framework/react/reference/index/type-aliases/SubscribePropsWithAtomWithSelector.md @@ -0,0 +1,83 @@ +--- +id: SubscribePropsWithAtomWithSelector +title: SubscribePropsWithAtomWithSelector +--- + +# Type Alias: SubscribePropsWithAtomWithSelector\ + +```ts +type SubscribePropsWithAtomWithSelector = object; +``` + +Defined in: [Subscribe.ts:54](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L54) + +Subscribe to a projected value from a slice atom. The selector receives the +atom value; children receive the projected `TSelected`. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TAtomValue + +`TAtomValue` + +### TSelected + +`TSelected` + +## Properties + +### atom + +```ts +atom: Atom | ReadonlyAtom; +``` + +Defined in: [Subscribe.ts:61](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L61) + +*** + +### children + +```ts +children: (state) => ReactNode | ReactNode; +``` + +Defined in: [Subscribe.ts:63](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L63) + +*** + +### selector() + +```ts +selector: (state) => TSelected; +``` + +Defined in: [Subscribe.ts:62](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L62) + +#### Parameters + +##### state + +`TAtomValue` + +#### Returns + +`TSelected` + +*** + +### table + +```ts +table: Table; +``` + +Defined in: [Subscribe.ts:60](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L60) diff --git a/docs/framework/react/reference/index/type-aliases/SubscribePropsWithStore.md b/docs/framework/react/reference/index/type-aliases/SubscribePropsWithStore.md new file mode 100644 index 0000000000..2147a86ae3 --- /dev/null +++ b/docs/framework/react/reference/index/type-aliases/SubscribePropsWithStore.md @@ -0,0 +1,75 @@ +--- +id: SubscribePropsWithStore +title: SubscribePropsWithStore +--- + +# Type Alias: SubscribePropsWithStore\ + +```ts +type SubscribePropsWithStore = object; +``` + +Defined in: [Subscribe.ts:17](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L17) + +Subscribe to `table.store` (full table state). The selector receives the full +TableState. + +## Type Parameters + +### TFeatures + +`TFeatures` *extends* `TableFeatures` + +### TData + +`TData` *extends* `RowData` + +### TSelected + +`TSelected` + +## Properties + +### children + +```ts +children: (state) => ReactNode | ReactNode; +``` + +Defined in: [Subscribe.ts:31](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L31) + +*** + +### selector() + +```ts +selector: (state) => TSelected; +``` + +Defined in: [Subscribe.ts:30](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L30) + +Select from full table state. Re-renders when the selected value changes +(shallow compare). + +Required in store mode so you never accidentally subscribe to the whole +store without an explicit projection. + +#### Parameters + +##### state + +`TableState`\<`TFeatures`\> + +#### Returns + +`TSelected` + +*** + +### table + +```ts +table: Table; +``` + +Defined in: [Subscribe.ts:22](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L22) diff --git a/examples/preact/composable-tables/src/components/table-components.tsx b/examples/preact/composable-tables/src/components/table-components.tsx index 146e4ef26d..9a6886db1d 100644 --- a/examples/preact/composable-tables/src/components/table-components.tsx +++ b/examples/preact/composable-tables/src/components/table-components.tsx @@ -4,6 +4,7 @@ * These components can be used via the pre-bound tableComponents * directly on the table object, e.g., */ +import type { PaginationState } from '@tanstack/preact-table' import { useTableContext } from '../hooks/table' /** @@ -13,8 +14,9 @@ export function PaginationControls() { const table = useTableContext() return ( - state.pagination}> - {(pagination) => ( + + {/* whole pagination slice — no selector needed */} + {(pagination: PaginationState) => (
+ {/* Store mode: full state for debugging */} state}> {(state) =>
{JSON.stringify(state, null, 2)}
}
diff --git a/examples/react/composable-tables/src/components/table-components.tsx b/examples/react/composable-tables/src/components/table-components.tsx index 5ba1a580ce..13ce65310a 100644 --- a/examples/react/composable-tables/src/components/table-components.tsx +++ b/examples/react/composable-tables/src/components/table-components.tsx @@ -4,6 +4,7 @@ * These components can be used via the pre-bound tableComponents * directly on the table object, e.g., */ +import type { PaginationState } from '@tanstack/react-table' import { useTableContext } from '../hooks/table' /** @@ -13,8 +14,9 @@ export function PaginationControls() { const table = useTableContext() return ( - state.pagination}> - {(pagination) => ( + + {/* whole pagination slice — no selector needed */} + {(pagination: PaginationState) => (