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

can.Model.List() updates its length after destoy() of one of its models only if it has bindings #495

Closed
azazel75 opened this issue Oct 11, 2013 · 1 comment
Milestone

Comments

@azazel75
Copy link

As you can see in this example: http://jsfiddle.net/mQdjS/4/ a model.List instance reacts on element.destroy() (by removing it) only if it has at least one binding, otherwise it's length isn't updated.

@ghost ghost assigned imjoshdean Oct 25, 2013
@imjoshdean
Copy link
Contributor

I scratched my noodle on this one for a while. I see your point; however, I'm struggling to find the use case where something like this would happen. If you are doing a live bound template with both of these lists and you destroy one of the models in the list, then both of the lists will react as expected. This is because we bind on each list when rendering the template.

Can you provide a potential real-world example where you might be running into this situation? One where you would only be listening on changes to one list, but would be expecting results from the other one without binding on it? In the mean time, I'm going to have to call this one "won't fix" because it is working as expected.

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

No branches or pull requests

2 participants