mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
Fix component widget state on graph change (#7648)
## Summary Component widgets (e.g. Load3D) in the root graph stay inactive after leaving a subgraph. ## Changes - Adds component widget class to the active widget filter. ## Screenshots |Before|After| |-|-| ||| ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7648-Fix-component-widget-state-on-graph-change-2ce6d73d365081aabff5d6c07430da3d) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -41,7 +41,11 @@ import {
|
||||
isComboInputSpecV1,
|
||||
isComboInputSpecV2
|
||||
} from '@/schemas/nodeDefSchema'
|
||||
import { type BaseDOMWidget, DOMWidgetImpl } from '@/scripts/domWidget'
|
||||
import {
|
||||
type BaseDOMWidget,
|
||||
ComponentWidgetImpl,
|
||||
DOMWidgetImpl
|
||||
} from '@/scripts/domWidget'
|
||||
import { useDialogService } from '@/services/dialogService'
|
||||
import { useSubscription } from '@/platform/cloud/subscription/composables/useSubscription'
|
||||
import { useExtensionService } from '@/services/extensionService'
|
||||
@@ -812,7 +816,10 @@ export class ComfyApp {
|
||||
> = Object.fromEntries(
|
||||
newGraph.nodes
|
||||
.flatMap((node) => node.widgets ?? [])
|
||||
.filter((w) => w instanceof DOMWidgetImpl)
|
||||
.filter(
|
||||
(w) =>
|
||||
w instanceof DOMWidgetImpl || w instanceof ComponentWidgetImpl
|
||||
)
|
||||
.map((w) => [w.id, w])
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user