We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a14f98d commit 7c3b835Copy full SHA for 7c3b835
examples/todo-app/index.html
@@ -21,7 +21,7 @@
21
the latest published version of VueFire, you
22
play with the code in this fiddle:
23
24
- https://jsfiddle.net/chrisvfritz/acy5n6j6/
+ https://jsfiddle.net/posva/wtyop5jy/
25
-->
26
27
<div id="app">
@@ -32,7 +32,10 @@
32
>
33
<ul>
34
<li v-for="todo in todos">
35
- {{ todo.text }}
+ <input
36
+ :value="todo.text"
37
+ @input="updateTodoText(todo, $event.target.value)"
38
+ >
39
<button @click="removeTodo(todo)">X</button>
40
</li>
41
</ul>
@@ -62,6 +65,9 @@
62
65
this.newTodoText = ''
63
66
}
64
67
},
68
+ updateTodoText: function (todo, newText) {
69
+ todosRef.child(todo['.key']).child('text').set(newText)
70
+ },
71
removeTodo: function (todo) {
72
todosRef.child(todo['.key']).remove()
73
0 commit comments