[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:
Christian Byrne
2025-11-02 09:54:47 -08:00
parent 704de20245
commit c92123aece
5 changed files with 192 additions and 2 deletions

View File

@@ -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 []