-
Notifications
You must be signed in to change notification settings - Fork 29
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
Search field is reader multi time on map when reuseMaps=true #49
Comments
Hi @matinfo, what version are you using? Are there any errors in the dev console when this happens? |
@SamSamskies the version used are: and not error in the console. My render look like this:
I found the cause of the issue, if I change to |
Thanks for the info. I've never used the reuseMaps prop before. I'll need to look into that. |
I wrap my ReactMapGl with Deck.gl, I use the suggestion to use reuseMap but still rendered minima three times, and after the viewport changed, it become so many search field |
Hi @mohridwanhdp, could you provide an example in Code Sandbox that demonstrates your issue? |
I'm sorry it's my mistake here cause not use the right ref Before, I use this in my ReactMapGL Then i change the ref like this : And It's become normal |
I implemented like in your example. Search field working well. But if I switch to an other page or when local dev server is reloaded on files change, the search field is not destroyed and an other appears.
How to fix that?
The text was updated successfully, but these errors were encountered: