Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updateTodoStatus is fired on render todo list #1

Open
jcgueriaud1 opened this issue Feb 22, 2021 · 0 comments
Open

updateTodoStatus is fired on render todo list #1

jcgueriaud1 opened this issue Feb 22, 2021 · 0 comments

Comments

@jcgueriaud1
Copy link
Contributor

jcgueriaud1 commented Feb 22, 2021

Steps to reproduce:

  • add some todos

Refresh the page. The updateTodoStatus is fired one per todo:

  updateTodoStatus(todo: Todo, e: CustomEvent) {
    console.log("updateTodoStatus");
    // don't save the task if the status didn't change
    if (todo.done !== e.detail.value) {
      todo.done = e.detail.value;
      store.saveTodo(todo);
    }
  }

I'm not really sure if there is a way to avoid this call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant