react-native-element-dropdown
react-native-element-dropdown copied to clipboard
Custom renderItem backgroundColor and border issue fix
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-element-dropdown/src/components/Dropdown/index.tsx b/node_modules/react-native-element-dropdown/src/components/Dropdown/index.tsx
index 83981dc..1ad3254 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
@@ -410,10 +410,10 @@ const DropdownComponent: <T>(
>
<View
style={StyleSheet.flatten([
- itemContainerStyle,
- selected && {
- backgroundColor: activeColor,
- },
+ selected && {
+ backgroundColor: activeColor,
+ },
+ itemContainerStyle,
])}
>
{renderItem ? (
diff --git a/node_modules/react-native-element-dropdown/src/components/MultiSelect/index.tsx b/node_modules/react-native-element-dropdown/src/components/MultiSelect/index.tsx
index 0c34c8d..1ea8f32 100644
--- a/node_modules/react-native-element-dropdown/src/components/MultiSelect/index.tsx
+++ b/node_modules/react-native-element-dropdown/src/components/MultiSelect/index.tsx
@@ -410,12 +410,12 @@ const MultiSelectComponent: <T>(
>
<View
style={StyleSheet.flatten([
- itemContainerStyle,
- selected && {
- backgroundColor: activeColor,
- ...styles.wrapItem,
- },
- ])}
+ selected && {
+ backgroundColor: activeColor,
+ ...styles.wrapItem,
+ },
+ itemContainerStyle,
+ ])}
>
{renderItem ? (
renderItem(item, selected)