software-mansion / react-native-gesture-handler

Declarative API exposing platform native touch and gesture system to React Native.
https://docs.swmansion.com/react-native-gesture-handler/
MIT License
5.83k stars 952 forks source link

Add `userSelect` to TouchableOpacity #2812

Closed m-bert closed 1 month ago

m-bert commented 1 month ago

Description

As pointed in this discussion, it is not possible to set userSelect property on TouchableOpacity component. This fixes this problem.

Test plan

Test code ```jsx import React from 'react'; import { StyleSheet, View, Text } from 'react-native'; import { TouchableOpacity } from 'react-native-gesture-handler'; export default function EmptyExample() { return ( Test ); } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, }); ```