Skip to content

Select dropdown modal UI brokenย #360

@rajeshmondalofficial

Description

@rajeshmondalofficial

Hi! ๐Ÿ‘‹

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

Today I used patch-package to patch react-native-element-dropdown@2.12.4 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-element-dropdown/src/components/Dropdown/index.tsx b/node_modules/react-native-element-dropdown/src/components/Dropdown/index.tsx
index 2a73f2f..a3c3c4e 100644
--- a/node_modules/react-native-element-dropdown/src/components/Dropdown/index.tsx
+++ b/node_modules/react-native-element-dropdown/src/components/Dropdown/index.tsx
@@ -22,6 +22,7 @@ import {
   Keyboard,
   KeyboardEvent,
   Modal,
+  Platform,
   StatusBar,
   StyleSheet,
   Text,
@@ -651,7 +652,10 @@ const DropdownComponent = React.forwardRef<IDropdownRef, DropdownProps<any>>(
 
         if (width && top && bottom) {
           const styleVertical: ViewStyle = {
-            left: left,
+           ...Platform.select({
+              ios: {left: left - 18, marginTop: -60},
+              android: {left: left,}
+            }),
             maxHeight: maxHeight,
             minHeight: minHeight,
           };

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions