Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit207f890

Browse files
Update packages/table-core/src/features/RowExpanding.ts
agreeCo-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent88ea0e8 commit207f890

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

‎packages/table-core/src/features/RowExpanding.ts‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,15 +311,12 @@ export const RowExpanding: TableFeature = {
311311
}
312312

313313
if(exists&&!expanded){
314-
constcurrentExpandedState=table.getState().expandedasExpandedStateList;
315-
constrowIds=Object.keys(currentExpandedState);
316-
constupdatedExpandedState=rowIds.reduce((acc,rowId)=>{
317-
if(!rowId.startsWith(row.id)){
318-
acc[rowId]=!!(currentExpandedState[rowId]);
314+
returnObject.keys(oldExpanded).reduce((acc,rowId)=>{
315+
if(rowId!==row.id&&!rowId.startsWith(row.id+'.')){
316+
acc[rowId]=oldExpanded[rowId];
319317
}
320318
returnacc;
321319
},{}asExpandedStateList);
322-
returnupdatedExpandedState;
323320
}
324321

325322
returnold

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp