Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable TouchableOpacity highlighting when scrolling

I want to disable highlighting of TouchableOpacity when scrolling inside of FlatList or ScrollView. onPress did not trigger when scrolling, it is just the highlighting effect that got triggered.

I've tried delayPressIn but it only delay the onPress time not the highlighting effect.

like image 347
Henry Avatar asked Jul 28 '18 14:07

Henry


1 Answers

That's a bit late but setting delayPressIn={ 50 } to your touchableOpacity component should fix your issue.

Ref: https://stackoverflow.com/a/37642488/9360334

like image 142
Théo dvn Avatar answered Oct 14 '22 13:10

Théo dvn