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

The filtered views behave incorrectly. #2

Open
zenoamaro opened this issue Sep 23, 2015 · 1 comment
Open

The filtered views behave incorrectly. #2

zenoamaro opened this issue Sep 23, 2015 · 1 comment

Comments

@zenoamaro
Copy link

When checking items while in a filtered view (ie. "active"), an action that would get an item filtered out sometimes brings back a different item instead.

I didn't investigate further, but this looks like an index or possibly event binding mismatch.

How to reproduce:

  • Insert items 1, 2, 3
  • Switch to "active" filter
  • Check "1"
  • Check "2"
  • Watch as checking "2" brings item "1" back.
@tcr
Copy link
Collaborator

tcr commented Sep 24, 2015

Ah, this is an easy one. I filter the list before generating the template: https://github.com/tcr/rust-todomvc/blob/master/src/main.rs#L101

I actually should just be checking that in a if statement, because the id parameter is married to the list entry's iteration in the loop. Hence you're toggling the 0th entry each time, but in the true list, not the visible one.

Thanks for the heads up @zenoamaro!

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

2 participants