BinaryInputBuilder was a bit fucky wucky without the update handler

This commit is contained in:
2025-10-07 12:02:21 +02:00
parent 99c876c48c
commit 48af642e4f

View File

@@ -235,11 +235,13 @@ class BinaryInputBuilder {
let input = new ElementBuilder("input#" + this.key)
.type("checkbox")
.checked(this.result[this.key])
.if(this.update_handler !== null, b => b.on_click(e => {
.on_click(e => {
console.log(e.target.checked);
this.result[this.key] = e.target.checked;
if(this.update_handler !== null) {
this.update_handler(e.target.checked);
}))
}
})
.finish();
let bundle = new ElementBuilder("div.horizontal-list")