@tanstack/svelte-table 8.5.2 → 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 +5 -4
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +5 -4
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +47 -47
- package/build/umd/index.development.js +5 -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/build/esm/index.js
CHANGED
|
@@ -2159,14 +2159,14 @@ const RowSelection = {
|
|
|
2159
2159
|
// return table.options.enableGroupingRowSelection ?? false
|
|
2160
2160
|
// },
|
|
2161
2161
|
getIsAllRowsSelected: () => {
|
|
2162
|
-
const
|
|
2162
|
+
const preGroupedFlatRows = table.getPreGroupedRowModel().flatRows;
|
|
2163
2163
|
const {
|
|
2164
2164
|
rowSelection
|
|
2165
2165
|
} = table.getState();
|
|
2166
|
-
let isAllRowsSelected = Boolean(
|
|
2166
|
+
let isAllRowsSelected = Boolean(preGroupedFlatRows.length && Object.keys(rowSelection).length);
|
|
2167
2167
|
|
|
2168
2168
|
if (isAllRowsSelected) {
|
|
2169
|
-
if (
|
|
2169
|
+
if (preGroupedFlatRows.some(row => row.getCanSelect() && !rowSelection[row.id])) {
|
|
2170
2170
|
isAllRowsSelected = false;
|
|
2171
2171
|
}
|
|
2172
2172
|
}
|
|
@@ -2977,7 +2977,8 @@ function createTable(options) {
|
|
|
2977
2977
|
|
|
2978
2978
|
return columnDefs.map(columnDef => {
|
|
2979
2979
|
const column = createColumn(table, columnDef, depth, parent);
|
|
2980
|
-
|
|
2980
|
+
const groupingColumnDef = columnDef;
|
|
2981
|
+
column.columns = groupingColumnDef.columns ? recurseColumns(groupingColumnDef.columns, column, depth + 1) : [];
|
|
2981
2982
|
return column;
|
|
2982
2983
|
});
|
|
2983
2984
|
};
|