Skip to content

Commit

Permalink
fix(ui): load workflow from file
Browse files Browse the repository at this point in the history
In a8de640 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
  • Loading branch information
psychedelicious committed Nov 4, 2024
1 parent 6c33e02 commit 81ce029
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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')}
Expand Down

0 comments on commit 81ce029

Please sign in to comment.