TouchableOpacity items not clickable when using drawer types "static" or "displace"
See original GitHub issueGreat component, but unfortunately, any time I set the drawer type to “static” or “displace”, my clickable items that are inside my opened drawer no longer work. I am using react-native-router-flux for actions, and the items in my drawer are this (this is inside a View that wraps the whole thing):
<ScrollView>
<View style={{position: 'relative'}}>
<TouchableOpacity
style={controlPanel.link}
underlayColor="#1f1f1f"
onPress={Actions.home}>
<Text style={controlPanel.linkText}>Home</Text>
</TouchableOpacity>
</View>
<View style={{position: 'relative'}}>
<TouchableOpacity
style={controlPanel.link}
underlayColor="#1f1f1f"
onPress={Actions.account}>
<View>
<Text style={controlPanel.linkText}>Your Account</Text>
</View>
</TouchableOpacity>
</View>
<View style={{position: 'relative'}}>
<TouchableOpacity
style={controlPanel.link}
underlayColor="#1f1f1f"
onPress={Actions.login}>
<View>
<Text style={controlPanel.linkText}>Sign Out</Text>
</View>
</TouchableOpacity>
</View>
<View style={controlPanel.close}>
</View>
</ScrollView>
Switching back to “overlay” as my drawer type makes them work again.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Absolutely placed TouchableOpacity not clickable if another ...
I have applied zIndex to every item and the view containing the touchable items, further elevation is also set to a value grated...
Read more >TouchableNativeFeedback - React Native
Determines the type of background drawable that's going to be used to display feedback. It takes an object with type property and extra...
Read more >Button - NativeBase
When you use the ButtonGroup component, it allows you to: Set some common properties such as size & colorSchemes of all buttons within...
Read more >Touchable Opacity not responding in stack navigator screen
Coding example for the question Touchable Opacity not responding in stack navigator screen - React Native-React Native.
Read more >React Native touchable vs. pressable components
import React from 'react'; import { SafeAreaView, TouchableOpacity, StyleSheet, View, Text, } from 'react-native'; const App = () => { const ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thought I’d try to provide sample usage for this. I’m having somewhat of a similar issue but I cannot activate Touchable buttons while using “overlay”. If I switch to using the other types, the buttons suddenly work. My usage is as follows:
Let me know if I can clarify more.
Works only when panOpenMask, panCloseMask props are removed from props.