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

23 lines
1005 B
Diff

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
--- 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 {
}
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 {
});
this.state = {
- items,
+ items: !isEqual(selectedItem, {}) ? items.filter(item => item.value !== null) : items,
selectedItem,
showPicker: false,
animationType: undefined,