verdnatura-chat/patches/react-native-picker-select+...

23 lines
1005 B
Diff
Raw Permalink Normal View History

2020-02-11 14:01:35 +00:00
diff --git a/node_modules/react-native-picker-select/src/index.js b/node_modules/react-native-picker-select/src/index.js
index 30a6732..bd1ccb5 100644
2020-02-11 14:01:35 +00:00
--- a/node_modules/react-native-picker-select/src/index.js
+++ b/node_modules/react-native-picker-select/src/index.js
@@ -138,7 +138,7 @@ export default class RNPickerSelect extends PureComponent {
2020-02-11 14:01:35 +00:00
}
return {
- ...(itemsChanged ? { items } : {}),
+ ...(itemsChanged ? { items: !isEqual(selectedItem, {}) ? items.filter(item => item.value !== null) : items } : {}),
...(selectedItemChanged ? { selectedItem } : {}),
};
}
@@ -160,7 +160,7 @@ export default class RNPickerSelect extends PureComponent {
2020-02-11 14:01:35 +00:00
});
this.state = {
- items,
+ items: !isEqual(selectedItem, {}) ? items.filter(item => item.value !== null) : items,
selectedItem,
showPicker: false,
animationType: undefined,