mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] tools: use t-model in benchmarks
This commit is contained in:
@@ -128,7 +128,9 @@ class App extends owl.Component {
|
|||||||
|
|
||||||
removeMessage(event) {
|
removeMessage(event) {
|
||||||
this.benchmark("remove message", () => {
|
this.benchmark("remove message", () => {
|
||||||
const index = this.state.messages.findIndex(m => m.id === event.detail.id);
|
const index = this.state.messages.findIndex(
|
||||||
|
m => m.id === event.detail.id
|
||||||
|
);
|
||||||
this.state.messages.splice(index, 1);
|
this.state.messages.splice(index, 1);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -146,14 +148,6 @@ class App extends owl.Component {
|
|||||||
clearLog() {
|
clearLog() {
|
||||||
this.refs.log.innerHTML = "";
|
this.refs.log.innerHTML = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleMultiple() {
|
|
||||||
this.state.multipleFlag = !this.state.multipleFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
toggleClear() {
|
|
||||||
this.state.clearAfterFlag = !this.state.clearAfterFlag;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flags">
|
<div class="flags">
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" id="multipleflag" t-on-change="toggleMultiple" t-att-checked="state.multipleFlag"/>
|
<input type="checkbox" id="multipleflag" t-model="multipleFlag"/>
|
||||||
<label for="multipleflag">Do it 20x</label>
|
<label for="multipleflag">Do it 20x</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" id="clearFlag" t-on-change="toggleClear" t-att-checked="state.clearAfterFlag"/>
|
<input type="checkbox" id="clearFlag" t-model="clearAfterFlag" />
|
||||||
<label for="clearFlag">Clear after</label>
|
<label for="clearFlag">Clear after</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user