mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
fix: add getSlotMenuOptions to BranchNode for slot rename
The default slot context menu skips "Rename Slot" for inputs that have a widget property set. Override getSlotMenuOptions on BranchNode to always show the rename option for input slots.
This commit is contained in:
@@ -175,6 +175,15 @@ function onBranchSelectorCreated(this: LGraphNode) {
|
||||
}
|
||||
})
|
||||
|
||||
// Allow renaming autogrow input slots via context menu
|
||||
this.getSlotMenuOptions = (slot) => {
|
||||
const menu: { content: string; slot: typeof slot }[] = []
|
||||
if (slot.input) {
|
||||
menu.push({ content: 'Rename Slot', slot })
|
||||
}
|
||||
return menu
|
||||
}
|
||||
|
||||
refreshBranchValues()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user