Merge pull request #464 from Hexastack/454-bug-visual-editor-default-flow-navigation

fix(frontend): handle visual editor default flow navigation
This commit is contained in:
Med Marrouchi 2024-12-19 07:01:07 +01:00 committed by GitHub
commit 971060d76f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -189,7 +189,8 @@ const Diagrams = () => {
}, []);
useEffect(() => {
setSelectedCategoryId(flowId || "");
if (flowId) setSelectedCategoryId(flowId);
else if (categories?.length) setSelectedCategoryId(categories[0].id);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [flowId]);