mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
[backport core/1.40] fix: propagate widget disabled state to Vue node components (#9594)
Backport of #9321 to `core/1.40` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9594-backport-core-1-40-fix-propagate-widget-disabled-state-to-Vue-node-components-31d6d73d3650817793c4f389e8252614) by [Unito](https://www.unito.io) Co-authored-by: Terry Jia <terryjia88@gmail.com>
This commit is contained in:
@@ -192,9 +192,11 @@ 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 slot-linked override for disabled
|
||||
// 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 ?? {}
|
||||
const widgetOptions = slotMetadata?.linked
|
||||
const isDisabled = slotMetadata?.linked || widgetState?.disabled
|
||||
const widgetOptions = isDisabled
|
||||
? { ...storeOptions, disabled: true }
|
||||
: storeOptions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user