mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): pending node connection stuck
This commit is contained in:
parent
3c2fa6b475
commit
55fe1ebc53
@ -18,7 +18,6 @@ import { IAINoContentFallback } from 'common/components/IAIImageFallback';
|
||||
import ScrollableContent from 'common/components/OverlayScrollbars/ScrollableContent';
|
||||
import { useBuildNode } from 'features/nodes/hooks/useBuildNode';
|
||||
import {
|
||||
$addNodeCmdk,
|
||||
$cursorPos,
|
||||
$edgePendingUpdate,
|
||||
$pendingConnection,
|
||||
@ -175,21 +174,20 @@ export const AddNodeCmdk = memo(() => {
|
||||
setSearchTerm(e.target.value);
|
||||
}, []);
|
||||
|
||||
const onSelect = useCallback(
|
||||
(value: string) => {
|
||||
addNode(value);
|
||||
$addNodeCmdk.set(false);
|
||||
setSearchTerm('');
|
||||
},
|
||||
[addNode]
|
||||
);
|
||||
|
||||
const onClose = useCallback(() => {
|
||||
addNodeCmdk.setFalse();
|
||||
setSearchTerm('');
|
||||
$pendingConnection.set(null);
|
||||
}, [addNodeCmdk]);
|
||||
|
||||
const onSelect = useCallback(
|
||||
(value: string) => {
|
||||
addNode(value);
|
||||
onClose();
|
||||
},
|
||||
[addNode, onClose]
|
||||
);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
isOpen={addNodeCmdkIsOpen}
|
||||
|
Loading…
Reference in New Issue
Block a user