@tanstack/react-table 8.5.2 → 8.5.5
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 +7 -5
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +7 -5
- 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 +7 -5
- 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
|
@@ -2160,14 +2160,14 @@ const RowSelection = {
|
|
|
2160
2160
|
// return table.options.enableGroupingRowSelection ?? false
|
|
2161
2161
|
// },
|
|
2162
2162
|
getIsAllRowsSelected: () => {
|
|
2163
|
-
const
|
|
2163
|
+
const preGroupedFlatRows = table.getFilteredRowModel().flatRows;
|
|
2164
2164
|
const {
|
|
2165
2165
|
rowSelection
|
|
2166
2166
|
} = table.getState();
|
|
2167
|
-
let isAllRowsSelected = Boolean(
|
|
2167
|
+
let isAllRowsSelected = Boolean(preGroupedFlatRows.length && Object.keys(rowSelection).length);
|
|
2168
2168
|
|
|
2169
2169
|
if (isAllRowsSelected) {
|
|
2170
|
-
if (
|
|
2170
|
+
if (preGroupedFlatRows.some(row => row.getCanSelect() && !rowSelection[row.id])) {
|
|
2171
2171
|
isAllRowsSelected = false;
|
|
2172
2172
|
}
|
|
2173
2173
|
}
|
|
@@ -2191,7 +2191,7 @@ const RowSelection = {
|
|
|
2191
2191
|
var _table$getState$rowSe;
|
|
2192
2192
|
|
|
2193
2193
|
const totalSelected = Object.keys((_table$getState$rowSe = table.getState().rowSelection) != null ? _table$getState$rowSe : {}).length;
|
|
2194
|
-
return totalSelected > 0 && totalSelected < table.
|
|
2194
|
+
return totalSelected > 0 && totalSelected < table.getFilteredRowModel().flatRows.length;
|
|
2195
2195
|
},
|
|
2196
2196
|
getIsSomePageRowsSelected: () => {
|
|
2197
2197
|
const paginationFlatRows = table.getPaginationRowModel().flatRows;
|
|
@@ -2978,7 +2978,8 @@ function createTable(options) {
|
|
|
2978
2978
|
|
|
2979
2979
|
return columnDefs.map(columnDef => {
|
|
2980
2980
|
const column = createColumn(table, columnDef, depth, parent);
|
|
2981
|
-
|
|
2981
|
+
const groupingColumnDef = columnDef;
|
|
2982
|
+
column.columns = groupingColumnDef.columns ? recurseColumns(groupingColumnDef.columns, column, depth + 1) : [];
|
|
2982
2983
|
return column;
|
|
2983
2984
|
});
|
|
2984
2985
|
};
|
|
@@ -3151,6 +3152,7 @@ const createRow = (table, id, original, rowIndex, depth, subRows) => {
|
|
|
3151
3152
|
// visits: number
|
|
3152
3153
|
// status: string
|
|
3153
3154
|
// progress: number
|
|
3155
|
+
// createdAt: Date
|
|
3154
3156
|
// nested: {
|
|
3155
3157
|
// foo: [
|
|
3156
3158
|
// {
|