@tanstack/react-table 8.0.0-alpha.87 → 8.0.0-beta.0
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/table-core/build/esm/index.js +22 -20
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +22 -20
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +17 -17
- package/build/umd/index.development.js +22 -20
- 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 +5 -5
package/build/stats-html.html
CHANGED
|
@@ -2669,7 +2669,7 @@ var drawChart = (function (exports) {
|
|
|
2669
2669
|
</script>
|
|
2670
2670
|
<script>
|
|
2671
2671
|
/*<!--*/
|
|
2672
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"
|
|
2672
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"0f57-127"},{"name":"react-table/src/index.tsx","uid":"0f57-129"}]}]}],"isRoot":true},"nodeParts":{"0f57-127":{"renderedLength":137430,"gzipLength":23365,"brotliLength":0,"mainUid":"0f57-126"},"0f57-129":{"renderedLength":2102,"gzipLength":836,"brotliLength":0,"mainUid":"0f57-128"}},"nodeMetas":{"0f57-126":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"0f57-127"},"imported":[],"importedBy":[{"uid":"0f57-128"}]},"0f57-128":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"0f57-129"},"imported":[{"uid":"0f57-130"},{"uid":"0f57-126"}],"importedBy":[],"isEntry":true},"0f57-130":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"0f57-128"}],"isExternal":true}},"env":{"rollup":"2.70.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
2673
2673
|
|
|
2674
2674
|
const run = () => {
|
|
2675
2675
|
const width = window.innerWidth;
|
package/build/stats-react.json
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"children": [
|
|
12
12
|
{
|
|
13
13
|
"name": "table-core/build/esm/index.js",
|
|
14
|
-
"uid": "
|
|
14
|
+
"uid": "0f57-132"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "react-table/src/index.tsx",
|
|
18
|
-
"uid": "
|
|
18
|
+
"uid": "0f57-134"
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
}
|
|
@@ -25,55 +25,55 @@
|
|
|
25
25
|
"isRoot": true
|
|
26
26
|
},
|
|
27
27
|
"nodeParts": {
|
|
28
|
-
"
|
|
29
|
-
"renderedLength":
|
|
30
|
-
"gzipLength":
|
|
28
|
+
"0f57-132": {
|
|
29
|
+
"renderedLength": 137430,
|
|
30
|
+
"gzipLength": 23365,
|
|
31
31
|
"brotliLength": 0,
|
|
32
|
-
"mainUid": "
|
|
32
|
+
"mainUid": "0f57-131"
|
|
33
33
|
},
|
|
34
|
-
"
|
|
34
|
+
"0f57-134": {
|
|
35
35
|
"renderedLength": 2102,
|
|
36
36
|
"gzipLength": 836,
|
|
37
37
|
"brotliLength": 0,
|
|
38
|
-
"mainUid": "
|
|
38
|
+
"mainUid": "0f57-133"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"nodeMetas": {
|
|
42
|
-
"
|
|
42
|
+
"0f57-131": {
|
|
43
43
|
"id": "/packages/table-core/build/esm/index.js",
|
|
44
44
|
"moduleParts": {
|
|
45
|
-
"index.production.js": "
|
|
45
|
+
"index.production.js": "0f57-132"
|
|
46
46
|
},
|
|
47
47
|
"imported": [],
|
|
48
48
|
"importedBy": [
|
|
49
49
|
{
|
|
50
|
-
"uid": "
|
|
50
|
+
"uid": "0f57-133"
|
|
51
51
|
}
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
|
-
"
|
|
54
|
+
"0f57-133": {
|
|
55
55
|
"id": "/packages/react-table/src/index.tsx",
|
|
56
56
|
"moduleParts": {
|
|
57
|
-
"index.production.js": "
|
|
57
|
+
"index.production.js": "0f57-134"
|
|
58
58
|
},
|
|
59
59
|
"imported": [
|
|
60
60
|
{
|
|
61
|
-
"uid": "
|
|
61
|
+
"uid": "0f57-135"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
|
-
"uid": "
|
|
64
|
+
"uid": "0f57-131"
|
|
65
65
|
}
|
|
66
66
|
],
|
|
67
67
|
"importedBy": [],
|
|
68
68
|
"isEntry": true
|
|
69
69
|
},
|
|
70
|
-
"
|
|
70
|
+
"0f57-135": {
|
|
71
71
|
"id": "react",
|
|
72
72
|
"moduleParts": {},
|
|
73
73
|
"imported": [],
|
|
74
74
|
"importedBy": [
|
|
75
75
|
{
|
|
76
|
-
"uid": "
|
|
76
|
+
"uid": "0f57-133"
|
|
77
77
|
}
|
|
78
78
|
],
|
|
79
79
|
"isExternal": true
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
let column = {
|
|
147
|
+
let column = {
|
|
148
148
|
id: "" + id,
|
|
149
149
|
accessorFn,
|
|
150
150
|
parent: parent,
|
|
@@ -908,8 +908,12 @@
|
|
|
908
908
|
getIsAllRowsExpanded: () => {
|
|
909
909
|
const expanded = instance.getState().expanded; // If expanded is true, save some cycles and return true
|
|
910
910
|
|
|
911
|
-
if (expanded ===
|
|
912
|
-
return true;
|
|
911
|
+
if (typeof expanded === 'boolean') {
|
|
912
|
+
return expanded === true;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
if (!Object.keys(expanded).length) {
|
|
916
|
+
return false;
|
|
913
917
|
} // If any row is not expanded, return false
|
|
914
918
|
|
|
915
919
|
|
|
@@ -2720,8 +2724,8 @@
|
|
|
2720
2724
|
},
|
|
2721
2725
|
createRow: (row, instance) => {
|
|
2722
2726
|
return {
|
|
2723
|
-
_getAllVisibleCells: memo(() => [row.getAllCells()
|
|
2724
|
-
return
|
|
2727
|
+
_getAllVisibleCells: memo(() => [row.getAllCells(), instance.getState().columnVisibility], cells => {
|
|
2728
|
+
return cells.filter(cell => cell.column.getIsVisible());
|
|
2725
2729
|
}, {
|
|
2726
2730
|
key: "development" === 'production' ,
|
|
2727
2731
|
debug: () => {
|
|
@@ -3072,13 +3076,15 @@
|
|
|
3072
3076
|
row,
|
|
3073
3077
|
column,
|
|
3074
3078
|
getValue: () => row.getValue(columnId),
|
|
3075
|
-
renderCell: () =>
|
|
3076
|
-
instance,
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3079
|
+
renderCell: () => {
|
|
3080
|
+
return column.columnDef.cell ? instance._render(column.columnDef.cell, {
|
|
3081
|
+
instance,
|
|
3082
|
+
column,
|
|
3083
|
+
row,
|
|
3084
|
+
cell: cell,
|
|
3085
|
+
getValue: cell.getValue
|
|
3086
|
+
}) : null;
|
|
3087
|
+
}
|
|
3082
3088
|
};
|
|
3083
3089
|
|
|
3084
3090
|
instance._features.forEach(feature => {
|
|
@@ -3153,27 +3159,23 @@
|
|
|
3153
3159
|
flatRows: [],
|
|
3154
3160
|
rowsById: {}
|
|
3155
3161
|
};
|
|
3156
|
-
let rows;
|
|
3157
|
-
let row;
|
|
3158
|
-
let originalRow;
|
|
3159
3162
|
|
|
3160
3163
|
const accessRows = function (originalRows, depth, parent) {
|
|
3161
3164
|
if (depth === void 0) {
|
|
3162
3165
|
depth = 0;
|
|
3163
3166
|
}
|
|
3164
3167
|
|
|
3165
|
-
rows = [];
|
|
3168
|
+
const rows = [];
|
|
3166
3169
|
|
|
3167
3170
|
for (let i = 0; i < originalRows.length; i++) {
|
|
3168
|
-
|
|
3171
|
+
// This could be an expensive check at scale, so we should move it somewhere else, but where?
|
|
3169
3172
|
// if (!id) {
|
|
3170
3173
|
// if ("development" !== 'production') {
|
|
3171
3174
|
// throw new Error(`getRowId expected an ID, but got ${id}`)
|
|
3172
3175
|
// }
|
|
3173
3176
|
// }
|
|
3174
3177
|
// Make the row
|
|
3175
|
-
|
|
3176
|
-
row = createRow(instance, instance._getRowId(originalRow, i, parent), originalRow, i, depth); // Keep track of every row in a flat array
|
|
3178
|
+
const row = createRow(instance, instance._getRowId(originalRows[i], i, parent), originalRows[i], i, depth); // Keep track of every row in a flat array
|
|
3177
3179
|
|
|
3178
3180
|
rowModel.flatRows.push(row); // Also keep track of every row by its ID
|
|
3179
3181
|
|
|
@@ -3184,7 +3186,7 @@
|
|
|
3184
3186
|
if (instance.options.getSubRows) {
|
|
3185
3187
|
var _row$originalSubRows;
|
|
3186
3188
|
|
|
3187
|
-
row.originalSubRows = instance.options.getSubRows(
|
|
3189
|
+
row.originalSubRows = instance.options.getSubRows(originalRows[i], i); // Then recursively access them
|
|
3188
3190
|
|
|
3189
3191
|
if ((_row$originalSubRows = row.originalSubRows) != null && _row$originalSubRows.length) {
|
|
3190
3192
|
row.subRows = accessRows(row.originalSubRows, depth + 1, row);
|