mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 23:08:07 +01:00
FIX: Sensitive onPress when using tooltip
This commit is contained in:
parent
c6717f1906
commit
c597364cbd
1 changed files with 28 additions and 7 deletions
|
@ -67,6 +67,32 @@ const ToolTipMenu = (props, ref) => {
|
||||||
props.children
|
props.children
|
||||||
)}
|
)}
|
||||||
</ContextMenuButton>
|
</ContextMenuButton>
|
||||||
|
) : props.onPress ? (
|
||||||
|
<TouchableOpacity accessibilityRole="button" onPress={props.onPress}>
|
||||||
|
<ContextMenuView
|
||||||
|
ref={ref}
|
||||||
|
internalCleanupMode="viewController"
|
||||||
|
onPressMenuItem={({ nativeEvent }) => {
|
||||||
|
props.onPressMenuItem(nativeEvent.actionKey);
|
||||||
|
}}
|
||||||
|
useActionSheetFallback={false}
|
||||||
|
menuConfig={{
|
||||||
|
menuTitle,
|
||||||
|
menuItems,
|
||||||
|
}}
|
||||||
|
{...(previewQRCode
|
||||||
|
? {
|
||||||
|
previewConfig: {
|
||||||
|
previewType: 'CUSTOM',
|
||||||
|
backgroundColor: 'white',
|
||||||
|
},
|
||||||
|
renderPreview: () => <QRCodeComponent value={previewValue} isMenuAvailable={false} />,
|
||||||
|
}
|
||||||
|
: {})}
|
||||||
|
>
|
||||||
|
{props.children}
|
||||||
|
</ContextMenuView>
|
||||||
|
</TouchableOpacity>
|
||||||
) : (
|
) : (
|
||||||
<ContextMenuView
|
<ContextMenuView
|
||||||
ref={ref}
|
ref={ref}
|
||||||
|
@ -74,6 +100,7 @@ const ToolTipMenu = (props, ref) => {
|
||||||
onPressMenuItem={({ nativeEvent }) => {
|
onPressMenuItem={({ nativeEvent }) => {
|
||||||
props.onPressMenuItem(nativeEvent.actionKey);
|
props.onPressMenuItem(nativeEvent.actionKey);
|
||||||
}}
|
}}
|
||||||
|
useActionSheetFallback={false}
|
||||||
menuConfig={{
|
menuConfig={{
|
||||||
menuTitle,
|
menuTitle,
|
||||||
menuItems,
|
menuItems,
|
||||||
|
@ -88,13 +115,7 @@ const ToolTipMenu = (props, ref) => {
|
||||||
}
|
}
|
||||||
: {})}
|
: {})}
|
||||||
>
|
>
|
||||||
{props.onPress ? (
|
{props.children}
|
||||||
<TouchableOpacity accessibilityRole="button" onPress={props.onPress}>
|
|
||||||
{props.children}
|
|
||||||
</TouchableOpacity>
|
|
||||||
) : (
|
|
||||||
props.children
|
|
||||||
)}
|
|
||||||
</ContextMenuView>
|
</ContextMenuView>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue