@tanstack/table-core 8.0.0-alpha.74 → 8.0.0-alpha.76
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/Headers.js +8 -4
- package/build/cjs/features/Headers.js.map +1 -1
- package/build/esm/index.js +8 -4
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +296 -296
- package/build/umd/index.development.js +8 -4
- 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 +2 -2
- package/src/features/Headers.ts +22 -4
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.76",
|
|
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",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"module": "build/esm/index.js",
|
|
28
28
|
"main": "build/cjs/index.js",
|
|
29
|
-
"browser": "build/umd/index.production.
|
|
29
|
+
"browser": "build/umd/index.production.js",
|
|
30
30
|
"types": "build/types/index.d.ts",
|
|
31
31
|
"sideEffects": false,
|
|
32
32
|
"engines": {
|
package/src/features/Headers.ts
CHANGED
|
@@ -173,8 +173,17 @@ export const Headers = {
|
|
|
173
173
|
instance.getState().columnPinning.left,
|
|
174
174
|
],
|
|
175
175
|
(allColumns, leafColumns, left) => {
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
const orderedLeafColumns =
|
|
177
|
+
left
|
|
178
|
+
?.map(columnId => leafColumns.find(d => d.id === columnId)!)
|
|
179
|
+
.filter(Boolean) ?? []
|
|
180
|
+
|
|
181
|
+
return buildHeaderGroups(
|
|
182
|
+
allColumns,
|
|
183
|
+
orderedLeafColumns,
|
|
184
|
+
instance,
|
|
185
|
+
'left'
|
|
186
|
+
)
|
|
178
187
|
},
|
|
179
188
|
{
|
|
180
189
|
key: process.env.NODE_ENV === 'development' && 'getLeftHeaderGroups',
|
|
@@ -190,8 +199,17 @@ export const Headers = {
|
|
|
190
199
|
instance.getState().columnPinning.right,
|
|
191
200
|
],
|
|
192
201
|
(allColumns, leafColumns, right) => {
|
|
193
|
-
|
|
194
|
-
|
|
202
|
+
const orderedLeafColumns =
|
|
203
|
+
right
|
|
204
|
+
?.map(columnId => leafColumns.find(d => d.id === columnId)!)
|
|
205
|
+
.filter(Boolean) ?? []
|
|
206
|
+
|
|
207
|
+
return buildHeaderGroups(
|
|
208
|
+
allColumns,
|
|
209
|
+
orderedLeafColumns,
|
|
210
|
+
instance,
|
|
211
|
+
'right'
|
|
212
|
+
)
|
|
195
213
|
},
|
|
196
214
|
{
|
|
197
215
|
key: process.env.NODE_ENV === 'development' && 'getRightHeaderGroups',
|