mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-19 09:54:24 -05:00
fix(ui): fix add node autoconnect
The new select component appears to close itself before calling the onchange handler. This short-circuits the autoconnect logic. Tweaked so the ordering is correct.
This commit is contained in:
@@ -155,8 +155,9 @@ const AddNodePopover = () => {
|
||||
return;
|
||||
}
|
||||
addNode(v.value);
|
||||
dispatch(addNodePopoverClosed());
|
||||
},
|
||||
[addNode]
|
||||
[addNode, dispatch]
|
||||
);
|
||||
|
||||
const onClose = useCallback(() => {
|
||||
@@ -235,6 +236,7 @@ const AddNodePopover = () => {
|
||||
onMenuClose={onClose}
|
||||
onKeyDown={onKeyDown}
|
||||
inputRef={inputRef}
|
||||
closeMenuOnSelect={false}
|
||||
/>
|
||||
</InvPopoverBody>
|
||||
</InvPopoverContent>
|
||||
|
||||
Reference in New Issue
Block a user