From b2c8ea3e50d63ad9ae105101f9471fa9acbb74f2 Mon Sep 17 00:00:00 2001 From: Johnpaul Chiwetelu <49923152+Myestery@users.noreply.github.com> Date: Tue, 3 Feb 2026 11:21:14 +0100 Subject: [PATCH] refactor: use emit events pattern instead of mutating props in widget components (#8549) --- src/components/rightSidePanel/RightSidePanel.vue | 8 ++++++++ .../rightSidePanel/parameters/SectionWidgets.vue | 10 ++++++++++ .../rightSidePanel/parameters/TabSubgraphInputs.vue | 7 +++++-- .../rightSidePanel/parameters/WidgetItem.vue | 9 +++++---- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/components/rightSidePanel/RightSidePanel.vue b/src/components/rightSidePanel/RightSidePanel.vue index 1ba514f66..2548b899b 100644 --- a/src/components/rightSidePanel/RightSidePanel.vue +++ b/src/components/rightSidePanel/RightSidePanel.vue @@ -8,6 +8,7 @@ import Tab from '@/components/tab/Tab.vue' import TabList from '@/components/tab/TabList.vue' import Button from '@/components/ui/button/Button.vue' import { useGraphHierarchy } from '@/composables/graph/useGraphHierarchy' +import type { ProxyWidgetsProperty } from '@/core/schemas/proxyWidget' import { st } from '@/i18n' import { SubgraphNode } from '@/lib/litegraph/src/litegraph' import type { LGraphNode } from '@/lib/litegraph/src/litegraph' @@ -190,6 +191,12 @@ function handleTitleEdit(newTitle: string) { function handleTitleCancel() { isEditing.value = false } + +function handleProxyWidgetsUpdate(value: ProxyWidgetsProperty) { + if (!selectedSingleNode.value) return + ;(selectedSingleNode.value as SubgraphNode).properties.proxyWidgets = value + canvasStore.canvas?.setDirty(true, true) +}