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

fix(GoogleMaps): VirtualContainer renders as child of GoogleMaps #61

Closed
wants to merge 2 commits into from
Closed

fix(GoogleMaps): VirtualContainer renders as child of GoogleMaps #61

wants to merge 2 commits into from

Conversation

idolize
Copy link
Collaborator

@idolize idolize commented May 27, 2015

This allows DOM elements to render inside as well as Google Map elements. This also fixes #47.

@tomchentw
Copy link
Owner

Interesting. Will <VirtualContainer> inside the div get clear when React diff algorithm take place? Since window.google.maps.Map will also render DOM into the div.

@idolize
Copy link
Collaborator Author

idolize commented Jun 2, 2015

@tomchentw Good question. What's the best way to test that? Are you saying that the VirtualContainer should or should not be cleared each time the diff happens?

I've been using this branch myself for a while now, and I haven't seen any warnings from React about the DOM being mutated unexpectedly.

@tomchentw
Copy link
Owner

@idolize just dynamically add more contents to the children of <GoogleMaps>. For examples, change <Marker> counts from one to three.

@idolize
Copy link
Collaborator Author

idolize commented Jun 8, 2015

I just tried this (using the event-arguments example code) and it works as expected—the <Marker>s are not cleared.

@idolize
Copy link
Collaborator Author

idolize commented Jun 12, 2015

@tomchentw Any chance of getting this merged? Thanks!

tomchentw added a commit that referenced this pull request Jun 17, 2015
* Fixes #61 and thanks to @idolize
* It seems that <VirtualContainer> can co-exist with the dom created by google.maps.Map.
* Since React use data-reactid to update children of <VirtualContainer>, there's little chance that the children of <GoogleMaps> will be cleared due to diff algorithm.
tomchentw added a commit that referenced this pull request Jun 17, 2015
* Fixes #61 and thanks to @idolize
* It seems that <VirtualContainer> can co-exist with the dom created by google.maps.Map.
* Since React use data-reactid to update children of <VirtualContainer>, there's little chance that the children of <GoogleMaps> will be cleared due to diff algorithm.
@tomchentw
Copy link
Owner

Released as v1.5.0

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

Successfully merging this pull request may close these issues.

Wrapper component lifecycle issue
2 participants