Skip to content

Commit 864a222

Browse files
Fix Async Tree not keeping descendant nodes hidden
Updated the createBasicRecord to also verify the parent isShown. Before it only checked to see if the parent was open.
1 parent 7d41f1b commit 864a222

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const createBasicRecord = <
6969
parent: NodeRecord<TNodePublicState> | null = null,
7070
): NodeRecord<TNodePublicState> => ({
7171
child: null,
72-
isShown: parent ? parent.public.isOpen : true,
72+
isShown: parent ? parent.public.isOpen && parent.isShown : true,
7373
parent,
7474
public: pub,
7575
sibling: null,

0 commit comments

Comments
 (0)