mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-15 23:05:11 -05:00
fix(ui): load workflow from file
In a8de6406c5 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
This commit is contained in:
committed by
Kent Keirsey
parent
be133408ac
commit
3e75331ef7
@@ -25,7 +25,7 @@ const WorkflowLibraryMenu = () => {
|
||||
const shift = useShiftModifier();
|
||||
useGlobalMenuClose(onClose);
|
||||
return (
|
||||
<Menu isOpen={isOpen} onOpen={onOpen} onClose={onClose} isLazy>
|
||||
<Menu isOpen={isOpen} onOpen={onOpen} onClose={onClose}>
|
||||
<MenuButton
|
||||
as={IconButton}
|
||||
aria-label={t('workflows.workflowEditorMenu')}
|
||||
|
||||
Reference in New Issue
Block a user