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;
|
return;
|
||||||
}
|
}
|
||||||
addNode(v.value);
|
addNode(v.value);
|
||||||
|
dispatch(addNodePopoverClosed());
|
||||||
},
|
},
|
||||||
[addNode]
|
[addNode, dispatch]
|
||||||
);
|
);
|
||||||
|
|
||||||
const onClose = useCallback(() => {
|
const onClose = useCallback(() => {
|
||||||
@@ -235,6 +236,7 @@ const AddNodePopover = () => {
|
|||||||
onMenuClose={onClose}
|
onMenuClose={onClose}
|
||||||
onKeyDown={onKeyDown}
|
onKeyDown={onKeyDown}
|
||||||
inputRef={inputRef}
|
inputRef={inputRef}
|
||||||
|
closeMenuOnSelect={false}
|
||||||
/>
|
/>
|
||||||
</InvPopoverBody>
|
</InvPopoverBody>
|
||||||
</InvPopoverContent>
|
</InvPopoverContent>
|
||||||
|
|||||||
Reference in New Issue
Block a user