-
Notifications
You must be signed in to change notification settings - Fork 91
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
fixing modal not hiding because of the animation #107
base: master
Are you sure you want to change the base?
Conversation
Is there any workaround for this issue for v1.2.0 + Expo SDK42? I am facing issues getting v2.0.0 to start with Expo SDK 42 to will need to stick to v1.2.0 till the other issue gets resolved. |
@gpsolarco you got this issue on mobile? |
Both Mobile and Web. |
Any update on this issue? thanks! |
@@ -124,6 +124,12 @@ class Menu extends React.Component { | |||
|
|||
// @@ TODO: Rework this | |||
_hide = () => { | |||
if (!!this.props.blockedHide) { |
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.
!!
are not necessary in if
statements.
On the
hide()
method, when themenuState
is being setted asHIDDEN
, this was triggering the_onMenuLayout()
method, so themenuState
was immediately being setted toANIMATING
, which was causing themodalVisible
variable to betrue
. So, though this was an unwanted behavior, in mobile it wasn't showing, but in web, because of the modal wasn't closing, it stayed and forced you to click on the screen again so that it closed after the menu disappeared.I simply added that when the
menuState
isHIDDEN
, the_onMenuLayout()
method ignores that trigger.