Skip to content

Exposing more style props in DropdownSelectedItemsContainer #122

@xenvi

Description

@xenvi

I had to apply the below diff to my code in order to right align the placeholder & value for my design requirements. Is there a way we can expose style props for the scrollview and selectedItemsContainer in DropdownSelectedItemsContainer?

diff --git a/node_modules/react-native-input-select/src/components/Dropdown/DropdownSelectedItemsContainer.tsx b/node_modules/react-native-input-select/src/components/Dropdown/DropdownSelectedItemsContainer.tsx
index 8f1bf12..48bce14 100644
--- a/node_modules/react-native-input-select/src/components/Dropdown/DropdownSelectedItemsContainer.tsx
+++ b/node_modules/react-native-input-select/src/components/Dropdown/DropdownSelectedItemsContainer.tsx
@@ -79,6 +79,9 @@ const DropdownSelectedItemsContainer = ({
         horizontal
         alwaysBounceHorizontal
         showsHorizontalScrollIndicator={false}
+        contentContainerStyle={{
+          flexGrow: 1,
+        }}
       >
         <View
           style={styles.selectedItemsContainer}
@@ -148,6 +151,9 @@ const styles = StyleSheet.create({
     flexDirection: 'row',
     flexWrap: 'nowrap',
     alignItems: 'center',
+    justifyContent: 'flex-end',
+    flex: 1,
+    marginRight: 24, // adjusted to prevent items overlapping absolutely-positioned dropdown icon
   },
   selectedItems: {
     color: colors.white,

<em>This issue body was [partially generated by patch-package](https://github.com/ds300/patch-package/issues/296).</em>

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions