-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix miTransitionLevel using recoil #441
Conversation
packages/react-components/src/components/MIMap/MapboxMap/MapboxMap.jsx
Outdated
Show resolved
Hide resolved
…xMap.jsx Co-authored-by: Anders Mogensen <[email protected]>
Suggestion applied @ammapspeople |
packages/react-components/src/components/MIMap/MapboxMap/MapboxMap.jsx
Outdated
Show resolved
Hide resolved
* React on changes in the miTransitionLevel prop. | ||
*/ | ||
useEffect(() => { | ||
setMapOptions({ miTransitionLevel: miTransitionLevel}) |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done ✅
…xMap.jsx Co-authored-by: Anders Mogensen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🆗 🆗 🆗
@ammapspeople I pushed a small fix that @andreeaceachir142 found. |
I removed using atoms inside MapboxMap.jsx
I made it so miTransitionLevel is respected in MapboxMap.jsx, if defined in the URL.