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

Tooltip flickering on markers list rerendering #1046

Open
7 tasks done
lluisd opened this issue Nov 25, 2022 · 2 comments
Open
7 tasks done

Tooltip flickering on markers list rerendering #1046

lluisd opened this issue Nov 25, 2022 · 2 comments

Comments

@lluisd
Copy link

lluisd commented Nov 25, 2022

Bug report in v4

  • All peer dependencies are installed: React, ReactDOM and Leaflet.
  • Using the latest version of React and ReactDOM v18.
  • Using the supported version of Leaflet (v1.8.0 minimum) and its corresponding CSS file is loaded.
  • Using the latest v4 version of React-Leaflet.
  • The issue has not already been reported.
  • Make sure you have followed the quick start guide for Leaflet.
  • Make sure you have fully read the documentation and that you understand the limitations.

Expected behavior

When markers are redendered with permanent tooltips I don't expect a flickering/flashing tooltip replaced for the new one.

Actual behavior

When markers are redendered the tooltips blink/flicker to be replaced by the new ones.

Steps to reproduce

make some state that rerenders the map with markers with tooltips inside.

live example by selecting some marker which rerenders the markers again and tooltip blinks: https://pumptrackmapapp.azurewebsites.net/

code: https://github.com/lluisd/pumptrack-map/blob/main/components/Map/Map.js

@damianobarbati
Copy link

@lluisd did you find solution to this?
My map has a markers prop which I loop to render using the <Marker /> component.
If I change 1 icon (keys are perserved in the .map) then the whole map re-rerender and flickers.

@lluisd
Copy link
Author

lluisd commented Mar 21, 2024

@lluisd did you find solution to this?
My map has a markers prop which I loop to render using the <Marker /> component.
If I change 1 icon (keys are perserved in the .map) then the whole map re-rerender and flickers.

yes, I fixed it by adding the Key attribute with the unique id of my marker/tooltip data. It was my fault being new with React

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

2 participants