@tanstack/react-table 8.5.0 → 8.5.3
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 +23 -7
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +23 -7
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +18 -18
- package/build/umd/index.development.js +23 -7
- 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/build/stats-html.html
CHANGED
|
@@ -4014,7 +4014,7 @@ var drawChart = (function (exports) {
|
|
|
4014
4014
|
</script>
|
|
4015
4015
|
<script>
|
|
4016
4016
|
/*<!--*/
|
|
4017
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"
|
|
4017
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"8751-127"},{"name":"react-table/src/index.tsx","uid":"8751-129"}]}]}],"isRoot":true},"nodeParts":{"8751-127":{"renderedLength":138229,"gzipLength":23986,"brotliLength":0,"mainUid":"8751-126"},"8751-129":{"renderedLength":1900,"gzipLength":752,"brotliLength":0,"mainUid":"8751-128"}},"nodeMetas":{"8751-126":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"8751-127"},"imported":[],"importedBy":[{"uid":"8751-128"}]},"8751-128":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"8751-129"},"imported":[{"uid":"8751-130"},{"uid":"8751-126"}],"importedBy":[],"isEntry":true},"8751-130":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"8751-128"}],"isExternal":true}},"env":{"rollup":"2.77.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
4018
4018
|
|
|
4019
4019
|
const run = () => {
|
|
4020
4020
|
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": "8751-132"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "react-table/src/index.tsx",
|
|
18
|
-
"uid": "
|
|
18
|
+
"uid": "8751-134"
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
}
|
|
@@ -25,62 +25,62 @@
|
|
|
25
25
|
"isRoot": true
|
|
26
26
|
},
|
|
27
27
|
"nodeParts": {
|
|
28
|
-
"
|
|
29
|
-
"renderedLength":
|
|
30
|
-
"gzipLength":
|
|
28
|
+
"8751-132": {
|
|
29
|
+
"renderedLength": 138229,
|
|
30
|
+
"gzipLength": 23986,
|
|
31
31
|
"brotliLength": 0,
|
|
32
|
-
"mainUid": "
|
|
32
|
+
"mainUid": "8751-131"
|
|
33
33
|
},
|
|
34
|
-
"
|
|
34
|
+
"8751-134": {
|
|
35
35
|
"renderedLength": 1900,
|
|
36
36
|
"gzipLength": 752,
|
|
37
37
|
"brotliLength": 0,
|
|
38
|
-
"mainUid": "
|
|
38
|
+
"mainUid": "8751-133"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"nodeMetas": {
|
|
42
|
-
"
|
|
42
|
+
"8751-131": {
|
|
43
43
|
"id": "/packages/table-core/build/esm/index.js",
|
|
44
44
|
"moduleParts": {
|
|
45
|
-
"index.production.js": "
|
|
45
|
+
"index.production.js": "8751-132"
|
|
46
46
|
},
|
|
47
47
|
"imported": [],
|
|
48
48
|
"importedBy": [
|
|
49
49
|
{
|
|
50
|
-
"uid": "
|
|
50
|
+
"uid": "8751-133"
|
|
51
51
|
}
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
|
-
"
|
|
54
|
+
"8751-133": {
|
|
55
55
|
"id": "/packages/react-table/src/index.tsx",
|
|
56
56
|
"moduleParts": {
|
|
57
|
-
"index.production.js": "
|
|
57
|
+
"index.production.js": "8751-134"
|
|
58
58
|
},
|
|
59
59
|
"imported": [
|
|
60
60
|
{
|
|
61
|
-
"uid": "
|
|
61
|
+
"uid": "8751-135"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
|
-
"uid": "
|
|
64
|
+
"uid": "8751-131"
|
|
65
65
|
}
|
|
66
66
|
],
|
|
67
67
|
"importedBy": [],
|
|
68
68
|
"isEntry": true
|
|
69
69
|
},
|
|
70
|
-
"
|
|
70
|
+
"8751-135": {
|
|
71
71
|
"id": "react",
|
|
72
72
|
"moduleParts": {},
|
|
73
73
|
"imported": [],
|
|
74
74
|
"importedBy": [
|
|
75
75
|
{
|
|
76
|
-
"uid": "
|
|
76
|
+
"uid": "8751-133"
|
|
77
77
|
}
|
|
78
78
|
],
|
|
79
79
|
"isExternal": true
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"env": {
|
|
83
|
-
"rollup": "2.77.
|
|
83
|
+
"rollup": "2.77.2"
|
|
84
84
|
},
|
|
85
85
|
"options": {
|
|
86
86
|
"gzip": true,
|
|
@@ -1322,8 +1322,11 @@
|
|
|
1322
1322
|
table.setColumnFilters(defaultState ? [] : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnFilters) != null ? _table$initialState$c : []);
|
|
1323
1323
|
},
|
|
1324
1324
|
getPreFilteredRowModel: () => table.getCoreRowModel(),
|
|
1325
|
-
_getFilteredRowModel: table.options.getFilteredRowModel && table.options.getFilteredRowModel(table),
|
|
1326
1325
|
getFilteredRowModel: () => {
|
|
1326
|
+
if (!table._getFilteredRowModel && table.options.getFilteredRowModel) {
|
|
1327
|
+
table._getFilteredRowModel = table.options.getFilteredRowModel(table);
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1327
1330
|
if (table.options.manualFiltering || !table._getFilteredRowModel) {
|
|
1328
1331
|
return table.getPreFilteredRowModel();
|
|
1329
1332
|
}
|
|
@@ -2177,14 +2180,14 @@
|
|
|
2177
2180
|
// return table.options.enableGroupingRowSelection ?? false
|
|
2178
2181
|
// },
|
|
2179
2182
|
getIsAllRowsSelected: () => {
|
|
2180
|
-
const
|
|
2183
|
+
const preGroupedFlatRows = table.getPreGroupedRowModel().flatRows;
|
|
2181
2184
|
const {
|
|
2182
2185
|
rowSelection
|
|
2183
2186
|
} = table.getState();
|
|
2184
|
-
let isAllRowsSelected = Boolean(
|
|
2187
|
+
let isAllRowsSelected = Boolean(preGroupedFlatRows.length && Object.keys(rowSelection).length);
|
|
2185
2188
|
|
|
2186
2189
|
if (isAllRowsSelected) {
|
|
2187
|
-
if (
|
|
2190
|
+
if (preGroupedFlatRows.some(row => row.getCanSelect() && !rowSelection[row.id])) {
|
|
2188
2191
|
isAllRowsSelected = false;
|
|
2189
2192
|
}
|
|
2190
2193
|
}
|
|
@@ -2952,8 +2955,20 @@
|
|
|
2952
2955
|
|
|
2953
2956
|
defaultColumn = (_defaultColumn = defaultColumn) != null ? _defaultColumn : {};
|
|
2954
2957
|
return {
|
|
2955
|
-
header: props =>
|
|
2956
|
-
|
|
2958
|
+
header: props => {
|
|
2959
|
+
const resolvedColumnDef = props.header.column.columnDef;
|
|
2960
|
+
|
|
2961
|
+
if (resolvedColumnDef.accessorKey) {
|
|
2962
|
+
return resolvedColumnDef.accessorKey;
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2965
|
+
if (resolvedColumnDef.accessorFn) {
|
|
2966
|
+
return resolvedColumnDef.id;
|
|
2967
|
+
}
|
|
2968
|
+
|
|
2969
|
+
return null;
|
|
2970
|
+
},
|
|
2971
|
+
// footer: props => props.header.column.id,
|
|
2957
2972
|
cell: props => {
|
|
2958
2973
|
var _props$renderValue$to, _props$renderValue;
|
|
2959
2974
|
|
|
@@ -2981,7 +2996,8 @@
|
|
|
2981
2996
|
|
|
2982
2997
|
return columnDefs.map(columnDef => {
|
|
2983
2998
|
const column = createColumn(table, columnDef, depth, parent);
|
|
2984
|
-
|
|
2999
|
+
const groupingColumnDef = columnDef;
|
|
3000
|
+
column.columns = groupingColumnDef.columns ? recurseColumns(groupingColumnDef.columns, column, depth + 1) : [];
|
|
2985
3001
|
return column;
|
|
2986
3002
|
});
|
|
2987
3003
|
};
|