mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00: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:
parent
3428ea1b3c
commit
3fe332e85f
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user