mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
Fix slice and serialization
lazy doesn't seem to track correctly on the backend. Needs further investigation
This commit is contained in:
@@ -129,10 +129,12 @@ function onBranchSelectorCreated(this: LGraphNode) {
|
||||
|
||||
this.widgets?.pop()
|
||||
const values = () =>
|
||||
this.inputs.slice(0, -2).map((i) => i.label ?? i.localized_name ?? i.name)
|
||||
this.inputs.slice(0, -1).map((i) => i.label ?? i.localized_name ?? i.name)
|
||||
const comboWidget = this.addWidget('combo', 'branch', '', () => {}, {
|
||||
values
|
||||
})
|
||||
comboWidget.serializeValue = () =>
|
||||
values().findIndex((e) => e === comboWidget.value)
|
||||
this.onConnectionsChange = useChainCallback(this.onConnectionsChange, () =>
|
||||
requestAnimationFrame(() => {
|
||||
const vals = values()
|
||||
|
||||
Reference in New Issue
Block a user