You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When passing className attribute to the Marker's props, it will add the initial state of the class names but when any of those class names have changed they do not impact the marker. I have to useEffect changes and adjust the element's classList doing something like this below:
Add a class name above that changes the state for example add something like is-selected if it is true, it should add the marker's class names to have is-selected, otherwise remove it.
Description
When passing className attribute to the Marker's props, it will add the initial state of the class names but when any of those class names have changed they do not impact the marker. I have to useEffect changes and adjust the element's classList doing something like this below:
Expected Behavior
Doing something like this
Should add/remove class names to the Marker if I pass it via
Steps to Reproduce
Add a class name above that changes the state for example add something like is-selected if it is true, it should add the marker's class names to have is-selected, otherwise remove it.
Environment
Framework version: react-map-gl@7.1.8
Map library: mapbox-gl@3.9.2
Browser: Chrome 131.0.6778.264
OS: Mac Sequoia 15.1.1 (24B91)
Logs
No response
The text was updated successfully, but these errors were encountered: