mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-20 14:54:12 +00:00
[backport cloud/1.35] Fix selecting loras on cloud (#7567)
Backport of #7560 to `cloud/1.35` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7567-backport-cloud-1-35-Fix-selecting-loras-on-cloud-2cb6d73d365081479a6fc918c7adf684) by [Unito](https://www.unito.io) Co-authored-by: AustinMroz <austin@comfy.org>
This commit is contained in:
@@ -328,7 +328,7 @@ export function useGraphNodeManager(graph: LGraph): GraphNodeManager {
|
||||
* Creates a wrapped callback for a widget that maintains LiteGraph/Vue sync
|
||||
*/
|
||||
const createWrappedWidgetCallback = (
|
||||
widget: { value?: unknown; name: string }, // LiteGraph widget with minimal typing
|
||||
widget: IBaseWidget, // LiteGraph widget with minimal typing
|
||||
originalCallback: ((value: unknown) => void) | undefined,
|
||||
nodeId: string
|
||||
) => {
|
||||
@@ -355,10 +355,10 @@ export function useGraphNodeManager(graph: LGraph): GraphNodeManager {
|
||||
}
|
||||
|
||||
// Always update widget.value to ensure sync
|
||||
widget.value = value
|
||||
widget.value = value ?? undefined
|
||||
|
||||
// 2. Call the original callback if it exists
|
||||
if (originalCallback) {
|
||||
if (originalCallback && widget.type !== 'asset') {
|
||||
originalCallback.call(widget, value)
|
||||
}
|
||||
|
||||
|
||||
@@ -180,11 +180,7 @@ const processedWidgets = computed((): ProcessedWidget[] => {
|
||||
// Update the widget value directly
|
||||
widget.value = value
|
||||
|
||||
// Skip callback for asset widgets - their callback opens the modal,
|
||||
// but Vue asset mode handles selection through the dropdown
|
||||
if (widget.type !== 'asset') {
|
||||
widget.callback?.(value)
|
||||
}
|
||||
widget.callback?.(value)
|
||||
}
|
||||
|
||||
const tooltipText = getWidgetTooltip(widget)
|
||||
|
||||
Reference in New Issue
Block a user