refactor: use emit events pattern instead of mutating props in widget components (#8549)

This commit is contained in:
Johnpaul Chiwetelu
2026-02-03 11:21:14 +01:00
committed by GitHub
parent f9af2cc4bd
commit b2c8ea3e50
4 changed files with 28 additions and 6 deletions

View File

@@ -32,6 +32,10 @@ const { node } = defineProps<{
node: SubgraphNode
}>()
const emit = defineEmits<{
'update:proxyWidgets': [value: ProxyWidgetsProperty]
}>()
const { t } = useI18n()
const canvasStore = useCanvasStore()
const rightSidePanelStore = useRightSidePanelStore()
@@ -51,8 +55,7 @@ const proxyWidgets = customRef<ProxyWidgetsProperty>((track, trigger) => ({
set(value?: ProxyWidgetsProperty) {
trigger()
if (!value) return
// eslint-disable-next-line vue/no-mutating-props
node.properties.proxyWidgets = value
emit('update:proxyWidgets', value)
}
}))