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

[Glimmer] ContainerView issue? #11062

Closed
amk221 opened this issue May 7, 2015 · 7 comments
Closed

[Glimmer] ContainerView issue? #11062

amk221 opened this issue May 7, 2015 · 7 comments
Labels
Milestone

Comments

@amk221
Copy link
Contributor

amk221 commented May 7, 2015

I'm not sure how best to describe this issue I'm experiencing, so I made two fiddles to demonstrate it:

1.12.0-beta.3: http://jsfiddle.net/amk221/dqf7qvzo/
1.13.0-beta.1: http://jsfiddle.net/amk221/1ecd458q/

I think what is happening is: The new ContainerView hbs template loops through its views using the each helper, re-rending them. This is causing the CSS animations to fire each time, when previously (pre-Glimmer) it did not.

@amk221 amk221 changed the title Glimmer ContainerView issue? [Glimmer] ContainerView issue? May 7, 2015
@krisselden
Copy link
Contributor

@amk221 you can solve by giving each a key prop that means the row should be stable with that key. Bonus this works if the underlying array is a new array but where the elements have been rendered before.

@wycats a default item key of index would at least match prior behavior for when the underlying array was stable and you pushed onto it.

@amk221
Copy link
Contributor Author

amk221 commented May 8, 2015

@krisselden Is this what you mean. It already has a key of elementId

@rwjblue rwjblue added this to the 1.13.0-beta.1 milestone May 8, 2015
@rwjblue rwjblue added the Bug label May 8, 2015
@krisselden
Copy link
Contributor

@amk221 sorry, I missed that, it does loop through each time but it shouldn't be recreating dom if the key is stable.

@amk221
Copy link
Contributor Author

amk221 commented Jun 11, 2015

@rwjblue Might this have been fixed by the recent work on each key ? #11337

@rwjblue
Copy link
Member

rwjblue commented Jun 11, 2015

@amk221 - It is certainly possible, would you mind confirming with an updated JSFiddle/JSBin?

@amk221
Copy link
Contributor Author

amk221 commented Jun 11, 2015

I just swapped the URLs for canary in the above fiddles, yes - issue has gone

@amk221 amk221 closed this as completed Jun 11, 2015
@rwjblue
Copy link
Member

rwjblue commented Jun 11, 2015

Awesome! Thank you!

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

No branches or pull requests

3 participants