From 3e75331ef7468b2762b2f551f05f458c4ef8de35 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 4 Nov 2024 18:10:27 +1000 Subject: [PATCH] fix(ui): load workflow from file In a8de6406c5e12e8fae7a6aef97c4fb606880b67f a change was made to many menus in an effort to improve performance. The menus were made to be lazy, so that they are mounted only while open. This causes unexpected behaviour when there is some logic in the menu that may need to execute after the user selects a menu item. In this case, when you click to load a workflow from file, the file picker opens but then the menuitem unmounts, taking the input element and all uploading logic with it. When you select a file, nothing happens because we've nuked the handlers by unmounting everything. Easy fix - un-lazy-fy the menu. Closes #7240 --- .../components/WorkflowLibraryMenu/WorkflowLibraryMenu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryMenu/WorkflowLibraryMenu.tsx b/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryMenu/WorkflowLibraryMenu.tsx index 38f44314d6..73e9f5d4ba 100644 --- a/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryMenu/WorkflowLibraryMenu.tsx +++ b/invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryMenu/WorkflowLibraryMenu.tsx @@ -25,7 +25,7 @@ const WorkflowLibraryMenu = () => { const shift = useShiftModifier(); useGlobalMenuClose(onClose); return ( -