From 671e33cf0901c892678ff16d7c1e84012e4f7fc0 Mon Sep 17 00:00:00 2001 From: AustinMroz Date: Thu, 23 Oct 2025 15:28:08 -0700 Subject: [PATCH] Fix asset browser on subgraph nodes (#6240) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a widget is linked to a subgraph, the subgraph creates a copy of the widget. The callback used by the asset browser to update the widget still refers to the widget that lives inside the subgraph, but at time of execution, this is overwritten by the unchanged value of the copy. This is fixed by instead updating the value of the caller. It's a little hacky, and may need future review. See also #6237 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6240-Fix-asset-browser-on-subgraph-nodes-2956d73d365081b49bd1cd1a7a254763) by [Unito](https://www.unito.io) --- .../extensions/vueNodes/widgets/composables/useComboWidget.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts b/src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts index 6e3e0319b..b52ee0a13 100644 --- a/src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts +++ b/src/renderer/extensions/vueNodes/widgets/composables/useComboWidget.ts @@ -76,7 +76,7 @@ const addComboWidget = ( 'asset', inputSpec.name, displayLabel, - async () => { + async function (this: IBaseWidget) { if (!isAssetWidget(widget)) { throw new Error(`Expected asset widget but received ${widget.type}`) } @@ -111,7 +111,7 @@ const addComboWidget = ( } const oldValue = widget.value - widget.value = validatedFilename.data + this.value = validatedFilename.data node.onWidgetChanged?.( widget.name, validatedFilename.data,