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

Initial rendering of 3rd party components interacting with the DOM #251

Open
PK1A opened this issue Jul 24, 2014 · 1 comment
Open

Initial rendering of 3rd party components interacting with the DOM #251

PK1A opened this issue Jul 24, 2014 · 1 comment
Labels

Comments

@PK1A
Copy link
Contributor

PK1A commented Jul 24, 2014

This is based on the experience from integrating 3rd-party jQuery component (highcharts) into a #space component. From a brief discussion with @b-laporte it looks like the initial rendering of a component is done in a document fragment which might create problems for 3rd party components that are reading dimensions info directly from the DOM.

For now a work-arround is to wrap the component rendering into a setTimeout statement.

I'm not sure how to flag this issue properly, that is - I don't know if the proper solution is to "fix" a $render method or provide a different callback. Marking it as bug for now as currently one needs to use a work-around to get proper rendering.

@PK1A PK1A added the bug label Jul 24, 2014
@benouat
Copy link
Member

benouat commented Jul 24, 2014

For me that one should be handled by introducing new states callbacks via the component api.
Something like onAttach, onBeforeDetach and onDetach corresponding as you can figure it out to the component lifecycle regarding its insertion and removal in the DOM.

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

2 participants