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

Batched Changes can create cycles in components two way bindings #1579

Closed
justinbmeyer opened this Issue Apr 1, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@justinbmeyer
Contributor

justinbmeyer commented Apr 1, 2015

If a component might always provide a new value everytime set is called like:

define: {
    // always returns a different list:
    variations: {
        set: function(variations) {
            return new can.List(variations.attr());
        }
    }
}

And that component is two way bound to another component:

<product-swatch-color variations="{variations}"></product-swatch-color>

If variations is changed in a batch, this will cause a never-ending series of variations changes.

The fix is to make sure that when a scope change causes a viewModel change, the viewModel change should not update the scope.

@justinbmeyer justinbmeyer added the bug label Apr 1, 2015

@justinbmeyer justinbmeyer added this to the 2.2.3 milestone Apr 1, 2015

@justinbmeyer justinbmeyer self-assigned this Apr 1, 2015

justinbmeyer added a commit that referenced this issue Apr 1, 2015

justinbmeyer added a commit that referenced this issue Apr 1, 2015

justinbmeyer added a commit that referenced this issue Apr 1, 2015

@daffl daffl closed this in #1580 Apr 1, 2015

@justinbmeyer justinbmeyer reopened this Apr 2, 2015

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Apr 2, 2015

Contributor

@daffl Added another change for this issue. Realized I did not implement it right.

Contributor

justinbmeyer commented Apr 2, 2015

@daffl Added another change for this issue. Realized I did not implement it right.

justinbmeyer added a commit that referenced this issue Apr 2, 2015

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Apr 2, 2015

Contributor

Should be fully fixed now with #1590

Contributor

daffl commented Apr 2, 2015

Should be fully fixed now with #1590

@daffl daffl closed this Apr 2, 2015

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