feat: performance improvements, bindings to refs can be unsubbed

This commit is contained in:
Daniel Ledda
2022-04-03 12:04:52 +02:00
parent f31cc87d20
commit bfb2ae8758
7 changed files with 144 additions and 65 deletions

View File

@@ -39,12 +39,12 @@ export default class BoolBoxView extends UINode {
build(): HTMLDivElement {
this.labelElement = h("label", {
classes: ["bool-box-label"],
innerText: this.label,
onclick: () => {
this.onInput(!this.checkboxElement.checked);
},
});
if (this.label !== null) {
this.labelElement.innerText = this.label;
this.labelElement.classList.add("visible");
}
this.checkboxElement = h("input", {