@tanstack/svelte-table 8.10.0 → 8.10.2

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.
@@ -1743,13 +1743,13 @@
1743
1743
  var _old$top, _old$bottom;
1744
1744
  return {
1745
1745
  top: ((_old$top = old == null ? void 0 : old.top) != null ? _old$top : []).filter(d => !(rowIds != null && rowIds.has(d))),
1746
- bottom: [...((_old$bottom = old == null ? void 0 : old.bottom) != null ? _old$bottom : []).filter(d => !(rowIds != null && rowIds.has(d))), ...rowIds]
1746
+ bottom: [...((_old$bottom = old == null ? void 0 : old.bottom) != null ? _old$bottom : []).filter(d => !(rowIds != null && rowIds.has(d))), ...Array.from(rowIds)]
1747
1747
  };
1748
1748
  }
1749
1749
  if (position === 'top') {
1750
1750
  var _old$top2, _old$bottom2;
1751
1751
  return {
1752
- top: [...((_old$top2 = old == null ? void 0 : old.top) != null ? _old$top2 : []).filter(d => !(rowIds != null && rowIds.has(d))), ...rowIds],
1752
+ top: [...((_old$top2 = old == null ? void 0 : old.top) != null ? _old$top2 : []).filter(d => !(rowIds != null && rowIds.has(d))), ...Array.from(rowIds)],
1753
1753
  bottom: ((_old$bottom2 = old == null ? void 0 : old.bottom) != null ? _old$bottom2 : []).filter(d => !(rowIds != null && rowIds.has(d)))
1754
1754
  };
1755
1755
  }
@@ -2155,9 +2155,10 @@
2155
2155
  };
2156
2156
  },
2157
2157
  createRow: (row, table) => {
2158
- row.toggleSelected = value => {
2158
+ row.toggleSelected = (value, opts) => {
2159
2159
  const isSelected = row.getIsSelected();
2160
2160
  table.setRowSelection(old => {
2161
+ var _opts$selectChildren;
2161
2162
  value = typeof value !== 'undefined' ? value : !isSelected;
2162
2163
  if (row.getCanSelect() && isSelected === value) {
2163
2164
  return old;
@@ -2165,7 +2166,9 @@
2165
2166
  const selectedRowIds = {
2166
2167
  ...old
2167
2168
  };
2168
- mutateRowIsSelected(selectedRowIds, row.id, value, table);
2169
+ if ((_opts$selectChildren = opts == null ? void 0 : opts.selectChildren) != null ? _opts$selectChildren : true) {
2170
+ mutateRowIsSelected(selectedRowIds, row.id, value, table);
2171
+ }
2169
2172
  return selectedRowIds;
2170
2173
  });
2171
2174
  };