Skip to content

Commit

Permalink
$mol_dump: non recursive expand_all
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Nov 5, 2023
1 parent dabf7fd commit 4856f2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dump/list/list.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ namespace $.$$ {
return this.values()[ index ]
}

expand_all( event?: Event, blacklist = new Set ) {
this.Dump(1).expand_all( event, blacklist )
expand_all( event?: Event ) {
this.Dump(1).expanded( true )
}

}
Expand Down
8 changes: 2 additions & 6 deletions dump/value/value.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,12 @@ namespace $.$$ {
return this.rows_values()[ index ]
}

expand_all( event?: Event, blacklist = new Set ) {

if( blacklist.has( this.value() ) ) return
blacklist.add( this.value() )

expand_all( event?: Event ) {
this.expanded( true )
for( const row of this.expand_content() ) {
if(!( row instanceof $mol_dump_list )) continue
if( row.values()[0] === '__proto__:' ) continue
row.expand_all( event, blacklist )
row.expand_all( event )
}

}
Expand Down

0 comments on commit 4856f2a

Please sign in to comment.