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

is willRender called correctly? #11532

Closed
Orgil opened this issue Jun 22, 2015 · 5 comments
Closed

is willRender called correctly? #11532

Orgil opened this issue Jun 22, 2015 · 5 comments

Comments

@Orgil
Copy link

Orgil commented Jun 22, 2015

I'm having nested components. Here is demo jsbin: http://emberjs.jsbin.com/mosiyedone/edit?html,js,console,output
output is

"init viewport"
-->"will render from viewport"
-->"init panel"
"will render from panel"
"did insert from panel"
"did insert from viewport"

is container rendering fired early? i don't know if it intentional or not.
i'm expecting

"init viewport"
-->"init panel"
-->"will render from viewport"
"will render from panel"
"did insert from panel"
"did insert from viewport"

Basically, is this correct that willRender not fired right before rendering component.

@rwjblue
Copy link
Member

rwjblue commented Jun 22, 2015

I believe the ordering is correct.

@Orgil
Copy link
Author

Orgil commented Jun 22, 2015

Then how do i predict child views while parent rendering?

@Orgil
Copy link
Author

Orgil commented Jun 22, 2015

i need to do layout calculation right before injecting to dom. seems hasElement state is proper point, but it doesnt have a hook. if i do it on willRender, parent doesn't know about its child components. Can you point me the right direction, where i should handle layout calculation?

@raytiley
Copy link
Contributor

Relevant: #11506

@rwjblue
Copy link
Member

rwjblue commented Jul 1, 2015

@raytiley - Yes, exactly, that issue was created to track this exact scenario. I'm closing this in favor of #11506.

@rwjblue rwjblue closed this as completed Jul 1, 2015
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

3 participants