@tanstack/table-core 8.10.2 → 8.10.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.
@@ -1966,7 +1966,7 @@ const RowSelection = {
1966
1966
  ...old
1967
1967
  };
1968
1968
  table.getRowModel().rows.forEach(row => {
1969
- mutateRowIsSelected(rowSelection, row.id, resolvedValue, table);
1969
+ mutateRowIsSelected(rowSelection, row.id, resolvedValue, true, table);
1970
1970
  });
1971
1971
  return rowSelection;
1972
1972
  });
@@ -2151,9 +2151,7 @@ const RowSelection = {
2151
2151
  const selectedRowIds = {
2152
2152
  ...old
2153
2153
  };
2154
- if ((_opts$selectChildren = opts == null ? void 0 : opts.selectChildren) != null ? _opts$selectChildren : true) {
2155
- mutateRowIsSelected(selectedRowIds, row.id, value, table);
2156
- }
2154
+ mutateRowIsSelected(selectedRowIds, row.id, value, (_opts$selectChildren = opts == null ? void 0 : opts.selectChildren) != null ? _opts$selectChildren : true, table);
2157
2155
  return selectedRowIds;
2158
2156
  });
2159
2157
  };
@@ -2206,7 +2204,7 @@ const RowSelection = {
2206
2204
  };
2207
2205
  }
2208
2206
  };
2209
- const mutateRowIsSelected = (selectedRowIds, id, value, table) => {
2207
+ const mutateRowIsSelected = (selectedRowIds, id, value, includeChildren, table) => {
2210
2208
  var _row$subRows;
2211
2209
  const row = table.getRow(id);
2212
2210
 
@@ -2228,8 +2226,8 @@ const mutateRowIsSelected = (selectedRowIds, id, value, table) => {
2228
2226
  }
2229
2227
  // }
2230
2228
 
2231
- if ((_row$subRows = row.subRows) != null && _row$subRows.length && row.getCanSelectSubRows()) {
2232
- row.subRows.forEach(row => mutateRowIsSelected(selectedRowIds, row.id, value, table));
2229
+ if (includeChildren && (_row$subRows = row.subRows) != null && _row$subRows.length && row.getCanSelectSubRows()) {
2230
+ row.subRows.forEach(row => mutateRowIsSelected(selectedRowIds, row.id, value, includeChildren, table));
2233
2231
  }
2234
2232
  };
2235
2233
  function selectRowsFn(table, rowModel) {