Control filter list (#2009)

* Add control_filter_list to filter items after queue

* fix regex

* backwards compatibility

* formatting

* revert

* Add and fix test
This commit is contained in:
pythongosssss
2023-11-22 17:52:20 +00:00
committed by GitHub
parent 1ca4802e8c
commit 70d2ea0faa
3 changed files with 141 additions and 19 deletions

View File

@@ -1,4 +1,4 @@
import { ComfyWidgets, addValueControlWidget } from "../../scripts/widgets.js";
import { ComfyWidgets, addValueControlWidgets } from "../../scripts/widgets.js";
import { app } from "../../scripts/app.js";
const CONVERTED_TYPE = "converted-widget";
@@ -467,7 +467,11 @@ app.registerExtension({
if (!control_value) {
control_value = "fixed";
}
addValueControlWidget(this, widget, control_value);
addValueControlWidgets(this, widget, control_value);
let filter = this.widgets_values?.[2];
if(filter && this.widgets.length === 3) {
this.widgets[2].value = filter;
}
}
// When our value changes, update other widgets to reflect our changes