-
Notifications
You must be signed in to change notification settings - Fork 98
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
[android] Fixed menu list remained tappable after dismiss on android #115
base: main
Are you sure you want to change the base?
[android] Fixed menu list remained tappable after dismiss on android #115
Conversation
<Animated.View style={[styles.menuContainer, messageStyles]}> | ||
<AnimatedView | ||
intensity={100} | ||
animatedProps={animatedProps} | ||
style={StyleSheet.absoluteFillObject} | ||
> | ||
<MenuItems items={itemList} /> | ||
</Animated.View> | ||
</AnimatedView> | ||
<Animated.View | ||
style={[ | ||
StyleSheet.absoluteFillObject, | ||
styles.menuInnerContainer, | ||
animatedInnerContainerStyle, | ||
]} | ||
> |
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.
what does this change do?
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.
This is applying the fix from this PR: https://github.com/enesozturk/react-native-hold-menu/pull/112/files
zIndex: 10, | ||
position: 'absolute', |
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.
what does this do?
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.
I think because we have these styles already in the styles.holdItem
if (!isVisible) | ||
return null |
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.
Did not test it, but I guess that this will break the animation when closing the menu.
We might need to wait for the animation somehow and then remove it
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.
It doesn't brake, you can check it
I set state in the animation callback when it's finished
@kesha-antonov An idea could be to use animatedProps with |
Why to keep rendered views underneath and waste device's resources? |
Hi, I saw the lib render {children} 2 times like this: <GestureHandler>
<Animated.View ref={containerRef} style={containerStyle}>
{children} => * HERE
</Animated.View>
</GestureHandler>
<Portal key={key} name={key}>
<Animated.View
key={key}
style={portalContainerStyle}
animatedProps={animatedPortalProps}
>
<PortalOverlay />
{children} => * HERE
</Animated.View>
</Portal> So I think that make performance down to hell from here |
You need to address it to main code base, not my PR) I didn't add this logic |
Hi
Fixes #76