callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.81k stars 2.08k forks source link

Switch component does not turn on with tap on Android, within SectionList #4361

Open chrysb opened 6 months ago

chrysb commented 6 months ago

Current behaviour

I have a Switch component within a SectionList

Tapping on it does not check the switch on Android. I can swipe to turn on the switch. I can tap to disable the switch, just not to turn it on.

By changing your code to use Switch from react-native-gesture-handler, it works.

I will likely just patch this locally, but something y'all should consider fixing.

Your Environment

software version
ios x
android 14
react-native 0.73.4
react-native-paper 5.12.3
node x.x.x
npm or yarn x.x.x
expo sdk ~50.0.7
gedu commented 6 months ago

Hey, can you show some code or provide a snack? I tried it and it worked for me

https://github.com/callstack/react-native-paper/assets/1676818/fd04318c-fa19-4957-a5bb-2bba6b997e78