Skip to content

Commit ebda81e

Browse files
fix(ui): fix add node autoconnect (#5434)
## What type of PR is this? (check all applicable) - [ ] Refactor - [ ] Feature - [x] Bug Fix - [ ] Optimization - [ ] Documentation Update - [ ] Community Node Submission ## Description 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. ## Related Tickets & Documents <!-- For pull requests that relate or close an issue, please include them below. For example having the text: "closes #1234" would connect the current pull request to issue 1234. And when we merge the pull request, Github will automatically close the issue. --> - Closes #5425 ## QA Instructions, Screenshots, Recordings bug should be fixed <!-- Please provide steps on how to test changes, any hardware or software specifications as well as any other pertinent information. --> ## Merge Plan This PR can be merged when approved <!-- A merge plan describes how this PR should be handled after it is approved. Example merge plans: - "This PR can be merged when approved" - "This must be squash-merged when approved" - "DO NOT MERGE - I will rebase and tidy commits before merging" - "#dev-chat on discord needs to be advised of this change when it is merged" A merge plan is particularly important for large PRs or PRs that touch the database in any way. -->
2 parents 3428ea1 + 3fe332e commit ebda81e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

invokeai/frontend/web/src/features/nodes/components/flow/AddNodePopover/AddNodePopover.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,9 @@ const AddNodePopover = () => {
155155
return;
156156
}
157157
addNode(v.value);
158+
dispatch(addNodePopoverClosed());
158159
},
159-
[addNode]
160+
[addNode, dispatch]
160161
);
161162

162163
const onClose = useCallback(() => {
@@ -235,6 +236,7 @@ const AddNodePopover = () => {
235236
onMenuClose={onClose}
236237
onKeyDown={onKeyDown}
237238
inputRef={inputRef}
239+
closeMenuOnSelect={false}
238240
/>
239241
</InvPopoverBody>
240242
</InvPopoverContent>

0 commit comments

Comments
 (0)