From d038137b3800b04c2b61e3865559e6fb2728a52c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Kaz=CC=81mierczak?= Date: Wed, 24 Jul 2024 16:04:43 +0200 Subject: [PATCH 1/2] Fix problem with expandSubsequently resolving before expanding all items --- .../src/environmentActions/EnvironmentActionsProvider.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/core/src/environmentActions/EnvironmentActionsProvider.tsx b/packages/core/src/environmentActions/EnvironmentActionsProvider.tsx index cc0dc2dc1..7f2790086 100644 --- a/packages/core/src/environmentActions/EnvironmentActionsProvider.tsx +++ b/packages/core/src/environmentActions/EnvironmentActionsProvider.tsx @@ -177,10 +177,13 @@ export const EnvironmentActionsProvider = React.forwardRef< await waitFor(() => !!itemsRef.current?.[current]).then(() => { const item = itemsRef.current[current]; if (!item) { - return; + return Promise.resolve(); } onExpandItem?.(item, treeId); - expandSubsequently(treeId, rest); + if (rest.length > 0) { + return expandSubsequently(treeId, rest); + } + return Promise.resolve(); }); }, [itemsRef, onExpandItem] From b95d54597dbbe6016f14df0ddf6d4f2937961371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Kaz=CC=81mierczak?= Date: Wed, 24 Jul 2024 16:21:50 +0200 Subject: [PATCH 2/2] Add release notes --- next-release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/next-release-notes.md b/next-release-notes.md index f77d5bd6a..5b3c6fcbc 100644 --- a/next-release-notes.md +++ b/next-release-notes.md @@ -4,6 +4,6 @@ ### Features ### Bug Fixes and Improvements - +- Fix problem with expandSubsequently resolving before expanding all items ### Other Changes --> \ No newline at end of file