@tanstack/table-core 9.0.0-beta.74 → 9.0.0-beta.75
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/table/constructTable.js +5 -1
- package/dist/core/table/coreTablesFeature.utils.js +2 -1
- package/package.json +1 -1
- package/skills/aggregation/SKILL.md +1 -1
- package/skills/api-not-found/SKILL.md +1 -1
- package/skills/cell-selection/SKILL.md +1 -1
- package/skills/cell-spanning/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 +1 -1
- package/skills/custom-features/SKILL.md +1 -1
- 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 +1 -1
- package/skills/sorting/SKILL.md +1 -1
- package/skills/table-features/SKILL.md +1 -1
- package/skills/typescript/SKILL.md +1 -1
|
@@ -92,7 +92,11 @@ function constructTable(tableOptions) {
|
|
|
92
92
|
const reactiveState = externalAtom ? externalAtom.get() : table.baseAtoms[key].get();
|
|
93
93
|
if (externalAtom) return reactiveState;
|
|
94
94
|
const controlledState = options.state;
|
|
95
|
-
|
|
95
|
+
if (controlledState && hasOwn(controlledState, key)) {
|
|
96
|
+
const controlledValue = controlledState[key];
|
|
97
|
+
return controlledValue === void 0 ? table.initialState[key] : controlledValue;
|
|
98
|
+
}
|
|
99
|
+
return reactiveState;
|
|
96
100
|
}, { debugName: `table/atoms/${key}` });
|
|
97
101
|
}
|
|
98
102
|
table_syncExternalStateToBaseAtoms(table);
|
|
@@ -27,7 +27,8 @@ function table_syncExternalStateToBaseAtoms(table, capturedState, compare = (cur
|
|
|
27
27
|
if (state) for (const key in state) {
|
|
28
28
|
const baseAtom = table.baseAtoms[key];
|
|
29
29
|
if (!baseAtom) continue;
|
|
30
|
-
const
|
|
30
|
+
const rawExternalState = state[key];
|
|
31
|
+
const externalState = rawExternalState === void 0 ? table.initialState[key] : rawExternalState;
|
|
31
32
|
if (!compare(table._reactivity.untrack(() => baseAtom.get()), externalState)) baseAtom.set(() => externalState);
|
|
32
33
|
}
|
|
33
34
|
});
|
package/package.json
CHANGED
package/skills/core/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ description: >
|
|
|
5
5
|
metadata:
|
|
6
6
|
type: sub-skill
|
|
7
7
|
library: '@tanstack/table-core'
|
|
8
|
-
library_version: '9.0.0-beta.
|
|
8
|
+
library_version: '9.0.0-beta.75'
|
|
9
9
|
requires: ['core', 'table-features', 'typescript']
|
|
10
10
|
sources:
|
|
11
11
|
- 'TanStack/table:docs/framework/react/guide/custom-features.md'
|
package/skills/grouping/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ description: >
|
|
|
5
5
|
metadata:
|
|
6
6
|
type: lifecycle
|
|
7
7
|
library: '@tanstack/table-core'
|
|
8
|
-
library_version: '9.0.0-beta.
|
|
8
|
+
library_version: '9.0.0-beta.75'
|
|
9
9
|
requires: ['core', 'table-features', 'typescript']
|
|
10
10
|
sources:
|
|
11
11
|
- 'TanStack/table:docs/framework/react/guide/migrating.md'
|
package/skills/sorting/SKILL.md
CHANGED