From 864a2223ae39fa2fe7bce40d008de55bbe67f6e0 Mon Sep 17 00:00:00 2001 From: Heavens Regent Date: Tue, 2 Mar 2021 11:33:24 -0700 Subject: [PATCH] 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. --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index bcec447..aa39439 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -69,7 +69,7 @@ export const createBasicRecord = < parent: NodeRecord | null = null, ): NodeRecord => ({ child: null, - isShown: parent ? parent.public.isOpen : true, + isShown: parent ? parent.public.isOpen && parent.isShown : true, parent, public: pub, sibling: null,