@tanstack/table-core 9.0.0-beta.42 → 9.0.0-beta.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/rows/constructRow.cjs +1 -0
- package/dist/core/rows/constructRow.cjs.map +1 -1
- package/dist/core/rows/constructRow.js +1 -0
- package/dist/core/rows/constructRow.js.map +1 -1
- package/dist/core/rows/coreRowsFeature.cjs +9 -0
- package/dist/core/rows/coreRowsFeature.cjs.map +1 -1
- package/dist/core/rows/coreRowsFeature.js +10 -1
- package/dist/core/rows/coreRowsFeature.js.map +1 -1
- package/dist/core/rows/coreRowsFeature.types.d.cts +24 -0
- package/dist/core/rows/coreRowsFeature.types.d.ts +24 -0
- package/dist/core/rows/coreRowsFeature.utils.cjs +34 -0
- package/dist/core/rows/coreRowsFeature.utils.cjs.map +1 -1
- package/dist/core/rows/coreRowsFeature.utils.d.cts +15 -1
- package/dist/core/rows/coreRowsFeature.utils.d.ts +15 -1
- package/dist/core/rows/coreRowsFeature.utils.js +33 -1
- package/dist/core/rows/coreRowsFeature.utils.js.map +1 -1
- package/dist/core/table/constructTable.cjs +1 -0
- package/dist/core/table/constructTable.cjs.map +1 -1
- package/dist/core/table/constructTable.js +1 -0
- package/dist/core/table/constructTable.js.map +1 -1
- package/dist/core/table/coreTablesFeature.types.d.cts +2 -1
- package/dist/core/table/coreTablesFeature.types.d.ts +2 -1
- package/dist/core/table/coreTablesFeature.utils.cjs +4 -1
- package/dist/core/table/coreTablesFeature.utils.cjs.map +1 -1
- package/dist/core/table/coreTablesFeature.utils.d.cts +2 -1
- package/dist/core/table/coreTablesFeature.utils.d.ts +2 -1
- package/dist/core/table/coreTablesFeature.utils.js +4 -1
- package/dist/core/table/coreTablesFeature.utils.js.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.cjs +13 -2
- package/dist/features/row-selection/rowSelectionFeature.cjs.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.js +13 -2
- package/dist/features/row-selection/rowSelectionFeature.js.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.types.d.cts +35 -5
- package/dist/features/row-selection/rowSelectionFeature.types.d.ts +35 -5
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs +50 -3
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +8 -6
- package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +8 -6
- package/dist/features/row-selection/rowSelectionFeature.utils.js +50 -3
- package/dist/features/row-selection/rowSelectionFeature.utils.js.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/static-functions.cjs +2 -0
- package/dist/static-functions.d.cts +2 -2
- package/dist/static-functions.d.ts +2 -2
- package/dist/static-functions.js +2 -2
- package/dist/types/TableFeatures.d.cts +22 -2
- package/dist/types/TableFeatures.d.ts +22 -2
- package/package.json +1 -1
- package/skills/api-not-found/SKILL.md +1 -1
- package/skills/client-vs-server/SKILL.md +1 -1
- package/skills/column-faceting/SKILL.md +1 -1
- package/skills/column-filtering/SKILL.md +1 -1
- package/skills/column-ordering/SKILL.md +1 -1
- package/skills/column-pinning/SKILL.md +1 -1
- package/skills/column-resizing/SKILL.md +1 -1
- package/skills/column-sizing/SKILL.md +1 -1
- package/skills/column-visibility/SKILL.md +1 -1
- package/skills/core/SKILL.md +37 -2
- package/skills/custom-features/SKILL.md +30 -2
- package/skills/expanding/SKILL.md +1 -1
- package/skills/global-filtering/SKILL.md +1 -1
- package/skills/grouping/SKILL.md +1 -1
- package/skills/migrate-v8-to-v9/SKILL.md +1 -1
- package/skills/pagination/SKILL.md +1 -1
- package/skills/row-pinning/SKILL.md +1 -1
- package/skills/row-selection/SKILL.md +91 -3
- package/skills/sorting/SKILL.md +1 -1
- package/skills/table-features/SKILL.md +1 -1
- package/skills/typescript/SKILL.md +1 -1
- package/src/core/rows/constructRow.ts +1 -0
- package/src/core/rows/coreRowsFeature.ts +15 -0
- package/src/core/rows/coreRowsFeature.types.ts +24 -0
- package/src/core/rows/coreRowsFeature.utils.ts +58 -0
- package/src/core/table/constructTable.ts +4 -0
- package/src/core/table/coreTablesFeature.types.ts +2 -1
- package/src/core/table/coreTablesFeature.utils.ts +7 -1
- package/src/features/row-selection/rowSelectionFeature.ts +19 -1
- package/src/features/row-selection/rowSelectionFeature.types.ts +37 -3
- package/src/features/row-selection/rowSelectionFeature.utils.ts +114 -14
- package/src/types/TableFeatures.ts +32 -2
|
@@ -368,8 +368,9 @@ export interface TableFeature {
|
|
|
368
368
|
*
|
|
369
369
|
* The table is a singleton, unlike rows, columns, headers, and cells, so
|
|
370
370
|
* table APIs are assigned directly instead of through a shared prototype.
|
|
371
|
-
* This
|
|
372
|
-
* state have been
|
|
371
|
+
* This hook is exclusively for assigning table methods. It runs after
|
|
372
|
+
* options, state atoms, and the store have been created and after every
|
|
373
|
+
* feature's `initTableInstanceData` hook has completed.
|
|
373
374
|
*/
|
|
374
375
|
constructTableAPIs?: <TFeatures extends TableFeatures, TData extends RowData>(
|
|
375
376
|
table: Table_Internal<TFeatures, TData>,
|
|
@@ -409,6 +410,22 @@ export interface TableFeature {
|
|
|
409
410
|
* override feature defaults.
|
|
410
411
|
*/
|
|
411
412
|
getInitialState?: (initialState: Partial<TableState_All>) => TableState_All
|
|
413
|
+
/**
|
|
414
|
+
* Initializes mutable, non-reactive data owned by this feature on the table
|
|
415
|
+
* instance.
|
|
416
|
+
*
|
|
417
|
+
* This runs once during table construction after options, state atoms, and
|
|
418
|
+
* the store are available, and before any feature's `constructTableAPIs`
|
|
419
|
+
* hook runs. Use `constructTableAPIs` exclusively for assigning table
|
|
420
|
+
* methods. Table resets do not rerun this hook; use
|
|
421
|
+
* `resetTableInstanceData` to clear transient instance data instead.
|
|
422
|
+
*/
|
|
423
|
+
initTableInstanceData?: <
|
|
424
|
+
TFeatures extends TableFeatures,
|
|
425
|
+
TData extends RowData,
|
|
426
|
+
>(
|
|
427
|
+
table: Table_Internal<TFeatures, TData>,
|
|
428
|
+
) => void
|
|
412
429
|
/**
|
|
413
430
|
* Initializes instance-specific data on each column.
|
|
414
431
|
*
|
|
@@ -438,4 +455,17 @@ export interface TableFeature {
|
|
|
438
455
|
>(
|
|
439
456
|
row: Row<TFeatures, TData>,
|
|
440
457
|
) => void
|
|
458
|
+
/**
|
|
459
|
+
* Resets mutable, non-reactive table-instance data owned by this feature.
|
|
460
|
+
*
|
|
461
|
+
* This runs after internally owned state atoms have been restored to
|
|
462
|
+
* `table.initialState` by `table.reset()`. It is intended for transient
|
|
463
|
+
* feature data, not table state slices or externally controlled state.
|
|
464
|
+
*/
|
|
465
|
+
resetTableInstanceData?: <
|
|
466
|
+
TFeatures extends TableFeatures,
|
|
467
|
+
TData extends RowData,
|
|
468
|
+
>(
|
|
469
|
+
table: Table_Internal<TFeatures, TData>,
|
|
470
|
+
) => void
|
|
441
471
|
}
|