Commit e5318d91 authored by pythongosssss's avatar pythongosssss
Browse files

Combo support detault value

parent 6db777b3
...@@ -497,7 +497,11 @@ class ComfyApp { ...@@ -497,7 +497,11 @@ class ComfyApp {
if (Array.isArray(type)) { if (Array.isArray(type)) {
// Enums e.g. latent rotation // Enums e.g. latent rotation
this.addWidget("combo", inputName, type[0], () => {}, { values: type }); let defaultValue = type[0];
if (inputData[1] && inputData[1].default) {
defaultValue = inputData[1].default;
}
this.addWidget("combo", inputName, defaultValue, () => {}, { values: type });
} else if (`${type}:${inputName}` in widgets) { } else if (`${type}:${inputName}` in widgets) {
// Support custom widgets by Type:Name // Support custom widgets by Type:Name
Object.assign(config, widgets[`${type}:${inputName}`](this, inputName, inputData, app) || {}); Object.assign(config, widgets[`${type}:${inputName}`](this, inputName, inputData, app) || {});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment