BinaryInputBuilder was a bit fucky wucky without the update handler
This commit is contained in:
6
utils.js
6
utils.js
@@ -235,11 +235,13 @@ class BinaryInputBuilder {
|
|||||||
let input = new ElementBuilder("input#" + this.key)
|
let input = new ElementBuilder("input#" + this.key)
|
||||||
.type("checkbox")
|
.type("checkbox")
|
||||||
.checked(this.result[this.key])
|
.checked(this.result[this.key])
|
||||||
.if(this.update_handler !== null, b => b.on_click(e => {
|
.on_click(e => {
|
||||||
console.log(e.target.checked);
|
console.log(e.target.checked);
|
||||||
this.result[this.key] = e.target.checked;
|
this.result[this.key] = e.target.checked;
|
||||||
|
if(this.update_handler !== null) {
|
||||||
this.update_handler(e.target.checked);
|
this.update_handler(e.target.checked);
|
||||||
}))
|
}
|
||||||
|
})
|
||||||
.finish();
|
.finish();
|
||||||
|
|
||||||
let bundle = new ElementBuilder("div.horizontal-list")
|
let bundle = new ElementBuilder("div.horizontal-list")
|
||||||
|
Reference in New Issue
Block a user