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

mapHolderRef only gets attached to direct child #94

Closed
nickhs opened this issue Aug 8, 2015 · 3 comments
Closed

mapHolderRef only gets attached to direct child #94

nickhs opened this issue Aug 8, 2015 · 3 comments

Comments

@nickhs
Copy link

nickhs commented Aug 8, 2015

Great library! Just one hiccup I've noticed so far:

When including a child in <GoogleMap> that could include an object (such as a Marker) the magic mapHolderRef property doesn't get attached to the underlying Marker object.

For example creating a structure something like:

<GoogleMap />
    <MyMarkerHolder />
         <Marker />

Will result in none of the <Markers /> having the necessary property set. The current workaround is to add a property in MyMarketHolder that establishes the link:

<GoogleMap />
     <MyMarketHolder mapHolderRef={this.props.mapHolderRef} />
         <Marker />

The relevant code in creators/GoogleMapHolder.js - perhaps that should be something like a recursive descent instead?

@tomchentw
Copy link
Owner

Something like <MyMarketHolder> is not currently supported. And I think you're right, right now in MyMarkerHolder#render you have to manually pass down mapHolderRef to children (Marker).

@replaid
Copy link

replaid commented Oct 23, 2015

I hit this too. Would you consider documenting this decision?

@tomchentw
Copy link
Owner

Close for #266 now.

We're also looking for maintainers. Involve in #266 to help strengthen our community!

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