mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-07 06:00:03 +00:00
[Refactor] Add util to merge input spec (#2834)
This commit is contained in:
@@ -3,8 +3,8 @@ import type { IComboWidget } from '@comfyorg/litegraph/dist/types/widgets'
|
||||
|
||||
import {
|
||||
type InputSpec,
|
||||
isComboInputSpec,
|
||||
isComboInputSpecV2
|
||||
getComboSpecComboOptions,
|
||||
isComboInputSpec
|
||||
} from '@/schemas/nodeDefSchema'
|
||||
import { addValueControlWidgets } from '@/scripts/widgets'
|
||||
import type { ComfyWidgetConstructor } from '@/scripts/widgets'
|
||||
@@ -24,9 +24,7 @@ export const useComboWidget = () => {
|
||||
|
||||
const widgetStore = useWidgetStore()
|
||||
const inputOptions = inputData[1] ?? {}
|
||||
const comboOptions =
|
||||
(isComboInputSpecV2(inputData) ? inputOptions.options : inputData[0]) ??
|
||||
[]
|
||||
const comboOptions = getComboSpecComboOptions(inputData)
|
||||
|
||||
const defaultValue = widgetStore.getDefaultValue(inputData)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user