mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 19:21:54 +00:00
Fix PrimeVue ref error on adding node via searchbox (#298)
This commit is contained in:
@@ -65,8 +65,6 @@ const closeDialog = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const addNode = (nodeDef: ComfyNodeDefImpl) => {
|
const addNode = (nodeDef: ComfyNodeDefImpl) => {
|
||||||
closeDialog()
|
|
||||||
|
|
||||||
const node = app.addNodeOnGraph(nodeDef, { pos: getNewNodeLocation() })
|
const node = app.addNodeOnGraph(nodeDef, { pos: getNewNodeLocation() })
|
||||||
|
|
||||||
const eventDetail = triggerEvent.value.detail
|
const eventDetail = triggerEvent.value.detail
|
||||||
@@ -75,6 +73,13 @@ const addNode = (nodeDef: ComfyNodeDefImpl) => {
|
|||||||
ConnectingLinkImpl.createFromPlainObject(link).connectTo(node)
|
ConnectingLinkImpl.createFromPlainObject(link).connectTo(node)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: This is not robust timing-wise.
|
||||||
|
// PrimeVue complains about the dialog being closed before the event selecting
|
||||||
|
// item is fully processed.
|
||||||
|
window.setTimeout(() => {
|
||||||
|
closeDialog()
|
||||||
|
}, 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
const canvasEventHandler = (e: LiteGraphCanvasEvent) => {
|
const canvasEventHandler = (e: LiteGraphCanvasEvent) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user