react-native-dropdown-picker icon indicating copy to clipboard operation
react-native-dropdown-picker copied to clipboard

Error scrollView App Android

Open Hoshiiii2602 opened this issue 1 year ago • 4 comments

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] 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 e3fb93b..91bcfa4 100644
--- a/node_modules/react-native-dropdown-picker/src/components/Picker.js
+++ b/node_modules/react-native-dropdown-picker/src/components/Picker.js
@@ -7,17 +7,17 @@ import React, {
     memo,
     Fragment,
 } from 'react';
-
+import { FlatList, ScrollView } from 'react-native-gesture-handler';
 import {
     View,
     SafeAreaView,
     TouchableOpacity,
     Text,
     Image,
-    FlatList,
+    // FlatList,
     TextInput,
     Dimensions,
-    ScrollView,
+    // ScrollView,
     Modal,
     ActivityIndicator,
     BackHandler,

This issue body was partially generated by patch-package.

Hoshiiii2602 avatar Nov 12 '23 13:11 Hoshiiii2602

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] 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 e3fb93b..91bcfa4 100644
--- a/node_modules/react-native-dropdown-picker/src/components/Picker.js
+++ b/node_modules/react-native-dropdown-picker/src/components/Picker.js
@@ -7,17 +7,17 @@ import React, {
     memo,
     Fragment,
 } from 'react';
-
+import { FlatList, ScrollView } from 'react-native-gesture-handler';
 import {
     View,
     SafeAreaView,
     TouchableOpacity,
     Text,
     Image,
-    FlatList,
+    // FlatList,
     TextInput,
     Dimensions,
-    ScrollView,
+    // ScrollView,
     Modal,
     ActivityIndicator,
     BackHandler,

This issue body was partially generated by patch-package.

Thanks This solve my issue

Danyal255 avatar Nov 27 '23 06:11 Danyal255

Hi, can you please explain how were you able to solve this issue? I find the solution a little vague

stolenfallen1 avatar Dec 18 '23 02:12 stolenfallen1

Hi, can you please explain how were you able to solve this issue? I find the solution a little vague

a/node_modules/react-native-dropdown-picker/src/components/Picker.js in this file just change the import of FlatList and scrollview from React Native to react-native-gesture-handler

Danyal255 avatar Dec 18 '23 03:12 Danyal255

@Danyal255 yep, I was able to look into it earlier. Thanks!

By the way, also i'll add to other users that might encounter issues after changing the import from the react-native to react-native-gesture-handler. Don't forget to wrap your app with GestureHandlerRootView.

stolenfallen1 avatar Dec 18 '23 04:12 stolenfallen1