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:
psychedelicious 2024-01-07 14:00:22 +11:00
parent 3428ea1b3c
commit 3fe332e85f
No known key found for this signature in database

View File

@ -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>