mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[DOC] add example of inline statement in main doc
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user