mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 10:12:11 +00:00
Fix asset selection in litegraph (#8117)
#8074 included some refactoring to the asset dialogue to ensure that it wouldn't pop up multiple times in vue mode But moving the openModal function to be contained in options means that `this` is no longer the widget, but instead the options object. This is fixed by requiring that widget be explicitly passed as a parameter. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8117-Fix-asset-selection-in-litegraph-2eb6d73d36508176b5a3f6d21964be39) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -55,7 +55,7 @@ interface IWidgetKnobOptions extends IWidgetOptions<number[]> {
|
||||
}
|
||||
|
||||
export interface IWidgetAssetOptions extends IWidgetOptions {
|
||||
openModal: () => void
|
||||
openModal: (widget: IBaseWidget) => void
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -53,6 +53,6 @@ export class AssetWidget
|
||||
|
||||
override onClick() {
|
||||
//Open Modal
|
||||
this.options.openModal()
|
||||
this.options.openModal(this)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user