We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 15f4c80 + 79797d1 commit 5c43c9cCopy full SHA for 5c43c9c
packages/table-core/src/features/RowExpanding.ts
@@ -311,8 +311,12 @@ export const RowExpanding: TableFeature = {
311
}
312
313
if (exists && !expanded) {
314
- const { [row.id]: _, ...rest } = oldExpanded
315
- return rest
+ return Object.keys(oldExpanded).reduce((acc, rowId) => {
+ if (rowId !== row.id && !rowId.startsWith(row.id + '.')) {
316
+ acc[rowId] = oldExpanded[rowId];
317
+ }
318
+ return acc;
319
+ }, {} as ExpandedStateList);
320
321
322
return old
0 commit comments