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

Fix miTransitionLevel using recoil #441

Merged

Conversation

matbmapspeople
Copy link
Contributor

@matbmapspeople matbmapspeople commented Jan 14, 2025

I removed using atoms inside MapboxMap.jsx
I made it so miTransitionLevel is respected in MapboxMap.jsx, if defined in the URL.

@matbmapspeople
Copy link
Contributor Author

Suggestion applied @ammapspeople

* React on changes in the miTransitionLevel prop.
*/
useEffect(() => {
setMapOptions({ miTransitionLevel: miTransitionLevel})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid the unexpected, maybe try to only set the property and value of the miTransitionLevel is a number (or can be parsed to a number).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done ✅

Copy link
Contributor

@ammapspeople ammapspeople left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗 🆗 🆗

@matbmapspeople
Copy link
Contributor Author

@ammapspeople I pushed a small fix that @andreeaceachir142 found.

@andreeaceachir142 andreeaceachir142 merged commit 331adb4 into main Jan 23, 2025
@andreeaceachir142 andreeaceachir142 deleted the bugfix/fix_mitransitionlevel_breaking_react_components branch January 23, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants