@tanstack/table-core 8.0.0-alpha.76 → 8.0.0-alpha.80
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/build/cjs/features/ColumnSizing.js +1 -1
- package/build/cjs/features/ColumnSizing.js.map +1 -1
- package/build/cjs/features/Headers.js +8 -6
- package/build/cjs/features/Headers.js.map +1 -1
- package/build/cjs/features/Rows.js +1 -1
- package/build/cjs/features/Rows.js.map +1 -1
- package/build/esm/index.js +10 -8
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +299 -299
- package/build/umd/index.development.js +10 -8
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/features/ColumnSizing.ts +1 -1
- package/src/features/Headers.ts +11 -6
- package/src/features/Rows.ts +5 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/table-core",
|
|
3
3
|
"author": "Tanner Linsley",
|
|
4
|
-
"version": "8.0.0-alpha.
|
|
4
|
+
"version": "8.0.0-alpha.80",
|
|
5
5
|
"description": "Hooks for building lightweight, fast and extendable datagrids for React",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/tanstack/react-table#readme",
|
package/src/features/Headers.ts
CHANGED
|
@@ -121,15 +121,20 @@ export const Headers = {
|
|
|
121
121
|
instance.getState().columnPinning.right,
|
|
122
122
|
],
|
|
123
123
|
(allColumns, leafColumns, left, right) => {
|
|
124
|
-
const leftColumns =
|
|
125
|
-
left
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
124
|
+
const leftColumns =
|
|
125
|
+
left
|
|
126
|
+
?.map(columnId => leafColumns.find(d => d.id === columnId)!)
|
|
127
|
+
.filter(Boolean) ?? []
|
|
128
|
+
|
|
129
|
+
const rightColumns =
|
|
130
|
+
right
|
|
131
|
+
?.map(columnId => leafColumns.find(d => d.id === columnId)!)
|
|
132
|
+
.filter(Boolean) ?? []
|
|
133
|
+
|
|
130
134
|
const centerColumns = leafColumns.filter(
|
|
131
135
|
column => !left?.includes(column.id) && !right?.includes(column.id)
|
|
132
136
|
)
|
|
137
|
+
|
|
133
138
|
const headerGroups = buildHeaderGroups(
|
|
134
139
|
allColumns,
|
|
135
140
|
[...leftColumns, ...centerColumns, ...rightColumns],
|
package/src/features/Rows.ts
CHANGED
|
@@ -85,14 +85,18 @@ export const Rows = {
|
|
|
85
85
|
if (row.valuesCache.hasOwnProperty(columnId)) {
|
|
86
86
|
return row.valuesCache[columnId]
|
|
87
87
|
}
|
|
88
|
+
|
|
88
89
|
const column = instance.getColumn(columnId)
|
|
90
|
+
|
|
89
91
|
if (!column.accessorFn) {
|
|
90
|
-
|
|
92
|
+
return undefined
|
|
91
93
|
}
|
|
94
|
+
|
|
92
95
|
row.valuesCache[columnId] = column.accessorFn(
|
|
93
96
|
row.original,
|
|
94
97
|
rowIndex
|
|
95
98
|
)
|
|
99
|
+
|
|
96
100
|
return row.valuesCache[columnId]
|
|
97
101
|
},
|
|
98
102
|
subRows: subRows ?? [],
|