Improve combo widget

This commit is contained in:
space-nuko
2023-05-10 12:18:02 -05:00
parent 7143fec258
commit 9097705a1a
4 changed files with 184 additions and 243 deletions

View File

@@ -458,19 +458,21 @@ export class ComfyComboNode extends ComfyWidgetNode<string> {
formatter = (value) => `${value}`;
try {
this.valuesForCombo = this.properties.values.map(value => {
this.valuesForCombo = this.properties.values.map((value, index) => {
return {
value,
label: formatter(value)
label: formatter(value),
index
}
})
}
catch (err) {
console.error("Failed formatting!", err)
this.valuesForCombo = this.properties.values.map(value => {
this.valuesForCombo = this.properties.values.map((value, index) => {
return {
value,
label: `${value}`
label: `${value}`,
index
}
})
}