20.05 Read Data - When Task Updated

This commit is contained in:
Fredrick W. Warren 2021-02-15 07:29:28 -08:00
parent 7378e2391a
commit ad8066b76e

View File

@ -81,6 +81,16 @@ const actions = {
} }
commit('addTask', payload) commit('addTask', payload)
}) })
// child changed
userTasks.on('child_changed', snapshot => {
const task = snapshot.val()
const payload = {
id: snapshot.key,
updates: task
}
commit('updateTask', payload)
})
} }
} }