mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-01 11:42:06 +00:00
[bugfix] Fix Vue nodes combo widgets not displaying deserialized values
Fixes an issue where combo widgets in Vue nodes would not display values from deserialized workflows if those values were not in the current options list (e.g., deleted model files, removed checkpoints). This brings Vue nodes behavior in line with legacy canvas rendering, which always displays the current value regardless of whether it exists in the options.
This commit is contained in:
@@ -32,6 +32,7 @@ import {
|
||||
|
||||
import { WidgetInputBaseClass } from './layout'
|
||||
import WidgetLayoutField from './layout/WidgetLayoutField.vue'
|
||||
import { ensureValueInOptions } from '../utils/widgetOptionsUtils'
|
||||
|
||||
const props = defineProps<{
|
||||
widget: SimplifiedWidget<string | number | undefined>
|
||||
@@ -63,7 +64,7 @@ const selectOptions = computed(() => {
|
||||
const options = props.widget.options
|
||||
|
||||
if (options?.values && Array.isArray(options.values)) {
|
||||
return options.values
|
||||
return ensureValueInOptions(options.values, localValue.value)
|
||||
}
|
||||
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user