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

Ember.computed.map issues #12210

Closed
jskeate opened this issue Aug 26, 2015 · 3 comments
Closed

Ember.computed.map issues #12210

jskeate opened this issue Aug 26, 2015 · 3 comments

Comments

@jskeate
Copy link

jskeate commented Aug 26, 2015

See this JSBin:

http://emberjs.jsbin.com/pulabawezu/1/edit?html,js,output

Clicking "change color" causes the Ember.computed.map version to add duplicate values. If you observe mappedModel and console.log its value on change, it actually changes four times.

@stefanpenner
Copy link
Member

@jskeate most of these issues have been resolved in 2.0. As the whole internals of these array computed macros are now lazy and simplified.

The world is unlikely to be back-ported, as the change was quite involved [https://github.com//pull/11513] and many apps depend on todays spurious change events.

In theory someone could extract these 2.0 macros and provide them as an addon to older systems. It is unlikely we will have time ourselves to support and provide this due to time constraints.

Unless I have misunderstood the issue, I believe this is fixed in 2.0 and should likely be closed.

@jskeate
Copy link
Author

jskeate commented Aug 26, 2015

Ah, ok. Just wasn't sure if this was a known issue or not; I did a quick scan and didn't find anything.

@jskeate jskeate closed this as completed Aug 26, 2015
@rwjblue
Copy link
Member

rwjblue commented Aug 26, 2015

Demo with 2.0.1 (does not duplicate items): http://emberjs.jsbin.com/goxobi/edit?html,js,output

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

3 participants