20.05 Read Data - When Task Updated
This commit is contained in:
parent
7378e2391a
commit
ad8066b76e
@ -81,6 +81,16 @@ const actions = {
|
||||
}
|
||||
commit('addTask', payload)
|
||||
})
|
||||
|
||||
// child changed
|
||||
userTasks.on('child_changed', snapshot => {
|
||||
const task = snapshot.val()
|
||||
const payload = {
|
||||
id: snapshot.key,
|
||||
updates: task
|
||||
}
|
||||
commit('updateTask', payload)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user