mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
fix: resolve empty combo options for promoted subgraph widgets
PromotedWidgetView never registers in widgetValueStore, so reading
options from the store always returned {}. Read options directly from
the widget for promoted views instead.
Fixes #9012
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -215,13 +215,15 @@ const processedWidgets = computed((): ProcessedWidget[] => {
|
||||
// Get value from store (falls back to undefined if not registered)
|
||||
const value = widgetState?.value as WidgetValue
|
||||
|
||||
// Build options from store state, with disabled override for
|
||||
// slot-linked widgets or widgets with disabled state (e.g. display-only)
|
||||
const storeOptions = widgetState?.options ?? {}
|
||||
// PromotedWidgetView is not a BaseWidget and never registers in the
|
||||
// widgetValueStore, so read options from the widget directly.
|
||||
const baseOptions = isPromotedView
|
||||
? (widget.options ?? {})
|
||||
: (widgetState?.options ?? {})
|
||||
const isDisabled = slotMetadata?.linked || widgetState?.disabled
|
||||
const widgetOptions = isDisabled
|
||||
? { ...storeOptions, disabled: true }
|
||||
: storeOptions
|
||||
? { ...baseOptions, disabled: true }
|
||||
: baseOptions
|
||||
|
||||
const borderStyle =
|
||||
graphId &&
|
||||
|
||||
Reference in New Issue
Block a user