React-native-gesture-handler: TouchableOpacity disappears when we style position absolute

Created on 11 Aug 2020  路  2Comments  路  Source: software-mansion/react-native-gesture-handler

Touchable

Most helpful comment

Same problem in import {TouchableOpacity} from 'react-native-gesture-handler' and import {TouchableWithoutFeedback} from 'react-native-gesture-handler'. But used import {TouchableOpacity} from 'react-native' and import {TouchableWithoutFeedback} from 'react-native' show the view.

All 2 comments

Same problem in import {TouchableOpacity} from 'react-native-gesture-handler' and import {TouchableWithoutFeedback} from 'react-native-gesture-handler'. But used import {TouchableOpacity} from 'react-native' and import {TouchableWithoutFeedback} from 'react-native' show the view.

A very quick fix for this is to wrap your touchable opacity from rngh with a view. Put your absolute positions in the view container, and the rest of your stylings in the touchable opacity.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brentvatne picture brentvatne  路  4Comments

brunolemos picture brunolemos  路  3Comments

rgangopadhya picture rgangopadhya  路  4Comments

jacobrosenskold picture jacobrosenskold  路  3Comments

tallen11 picture tallen11  路  3Comments