react-native-dropdown-picker: Scroll is not working on android

Hi! šŸ‘‹

Firstly, thanks for your work on this project! šŸ™‚

Today I used patch-package to patch react-native-dropdown-picker@5.4.2 for the project I’m working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-dropdown-picker/src/components/Picker.js b/node_modules/react-native-dropdown-picker/src/components/Picker.js
index 9bbacc7..bc84de6 100644
--- a/node_modules/react-native-dropdown-picker/src/components/Picker.js
+++ b/node_modules/react-native-dropdown-picker/src/components/Picker.js
@@ -14,10 +14,10 @@ import {
     TouchableOpacity,
     Text,
     Image,
-    FlatList,
+    // FlatList,
     TextInput,
     Dimensions,
-    ScrollView,
+    // ScrollView,
     Modal,
     ActivityIndicator,
     BackHandler,
@@ -25,6 +25,8 @@ import {
     StyleSheet,
 } from 'react-native';
 
+import { FlatList, ScrollView } from 'react-native-gesture-handler';
+
 const { height: WINDOW_HEIGHT } = Dimensions.get('window');
 
 import Colors from '../constants/colors';

This issue body was partially generated by patch-package.

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 22
  • Comments: 17 (3 by maintainers)

Most upvoted comments

In my case, I fixed this issue with these steps: 1- My project already had react-native-gesture-handler in version 2.4.0; 2- I installed react-native-dropdown-picker@^5.4.7-beta.1; 3- I placed the z-index in the view that surrounds the DropDown component (only here);

Voila, everything works perfectly now

use the "react-native-dropdown-picker": "^5.4.7-beta.1",

Still not working for me

@jobrdelivery Thanks, it works perfectly

@hossein-zare Could you please consider this solution?