[DOC] add example of inline statement in main doc

This commit is contained in:
Géry Debongnie
2019-10-25 14:56:09 +02:00
parent 2beb12678e
commit 1ca401811f
2 changed files with 7 additions and 5 deletions
+1 -5
View File
@@ -466,10 +466,6 @@ class TodoItem extends Component {
useAutofocus("input");
}
editTodo() {
this.state.isEditing = true;
}
handleKeyup(ev) {
if (ev.keyCode === ENTER_KEY) {
this.updateTitle(ev.target.value);
@@ -603,7 +599,7 @@ const TODO_APP_STORE_XML = `<templates>
<li t-name="TodoItem" class="todo" t-att-class="{completed: props.completed, editing: state.isEditing}">
<div class="view">
<input class="toggle" type="checkbox" t-on-change="dispatch('toggleTodo', props.id)" t-att-checked="props.completed"/>
<label t-on-dblclick="editTodo">
<label t-on-dblclick="state.isEditing = true">
<t t-esc="props.title"/>
</label>
<button class="destroy" t-on-click="dispatch('removeTodo', props.id)"></button>