From 019947c28c17cef1089387c3cdca85587f31e710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=91=AB?= Date: Tue, 21 Mar 2023 17:20:11 +0800 Subject: [PATCH] Add preview ref api for Node --- packages/react-arborist/src/components/provider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-arborist/src/components/provider.tsx b/packages/react-arborist/src/components/provider.tsx index 60b8899..532309c 100644 --- a/packages/react-arborist/src/components/provider.tsx +++ b/packages/react-arborist/src/components/provider.tsx @@ -57,7 +57,7 @@ export function TreeProvider({ useMemo(() => { updateCount.current += 1; api.update(treeProps); - }, [...Object.values(treeProps), state.nodes.open]); + }, [...Object.values(treeProps), state.nodes.open, state.dnd.parentId]); /* Expose the tree api */ useImperativeHandle(imperativeHandle, () => api);