-
Notifications
You must be signed in to change notification settings - Fork 936
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
Rendering component in infoBox doesn't render Link href #258
Comments
Also tested using |
@wuct any ideas why this may be? |
AFAIK A quick fix would be setting <Link href={mode.url} /> A better solution would be making |
Since we now have major adoption for We're also looking for maintainers. Involve in #266 to help strengthen our community! |
@tomchentw I do not see why you closed this issue, please reopen it - it is still outstanding, I was about to post the same! Context should be passed, but it is lost because children are rendered using I understand the |
Note that @wuct's tentative solution of setting Long story short - those are not problems I should need to debug, since react-google-maps should be passing For now, I'm falling back to |
@benwiley4000 did you figure this out? is it possible to set the route from the parent and pass the handler down to the infoWindow? I'm able to execute redux actions from the infoWindow by doing that, but I don't know too much about React Router, so uncertain if same applies |
@brandonmp: I probably could pass an action down, but I would like to be able to use React Router's |
word, but a bird in hand & all that the real bummer for me is i can't use MUI components as they require context. haven't found a workaround for that yet. |
@benwiley4000 @corbpaul @brandonmp I'm sorry to close this but it would be great if you can help! Yes you are right we should switch to Do you want to open up a PR for this? Just to let you know, we just released 6.0.0 and it's rewritten from scratch. I hope this could help you understand the code base faster. It'ss released on npm beta tag. We also have a new demo page. Feel free to try it: |
@tomchentw thanks for the update. I'm adding this to my todo list and I'll look at it soon. :) |
Addressed by #361. |
Closed by #361 , thanks @benwiley4000 ! |
* Closes #258 * PR #361 * Ref commit: 5748a96 * Thanks to @benwiley4000
Released v6.0.1 in the npm |
What about OverlayView and maybe other components? |
@stupidisum good catch, didn't notice that when I was working on the pull request because child rendering works a bit differently than |
Has this issue cropped back up again with react router v4? All my Links work without causing a page reload except for the ones inside the InfoBox. For me replicating the issue is as simple as a Link inside an InfoBox, clicking it, and the link is followed like a traditional anchor tag. Perhaps a Link will never work in the InfoBox due to the event propagation? I created a stack-overflow about this as well but no responses. https://stackoverflow.com/questions/48234933/link-in-infobox-using-react-google-maps-causes-page-reload |
i'm facing same issue. i've a menu inside the InfoBox. And each menu item has a Link. Clicking on a menu item is causing a reload. |
I'm passing a component into an infoBox:
<InfoBox><Component model={model} /></InfoBox>
Within that component is a
Link
fromreact-router
:<Link to={model.url}>url</Link>
but when the infoBox is displayed the
a
tag renders in the DOM without a hrefThe text was updated successfully, but these errors were encountered: