Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created October 28, 2017 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthieu-D/e03a3e4b098f58b96ac3548f7bf76d68 to your computer and use it in GitHub Desktop.
Save matthieu-D/e03a3e4b098f58b96ac3548f7bf76d68 to your computer and use it in GitHub Desktop.
@Listen('updateTodo')
updateValue(event) {
const todos = this.todos.concat([]);
let todoToUpdate = todos.filter((todo) => {
return todo.id === event.detail.id;
})[0];
todoToUpdate.value = event.detail.value;
this.todos = todos;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment