react-crud-mobile 1.0.481 → 1.0.482

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -70,19 +70,21 @@ export default function UIModal(props: ChildType) {
70
70
  return <></>;
71
71
  }
72
72
 
73
+ let onClose = () => {
74
+ scope.close({ scope, crud, event: {} });
75
+ };
76
+
73
77
  return (
74
78
  <Modal
75
79
  animationType="slide"
76
80
  transparent={true}
77
81
  visible={modalVisible}
78
- onRequestClose={() => {
79
- scope.close({ scope, crud, event: {} });
80
- }}
82
+ onRequestClose={() => onClose}
81
83
  >
82
84
  <SafeAreaView style={style('modalSafe')}>
83
85
  <View style={style('modalHeader')}>
84
86
  <TouchableOpacity
85
- onPress={() => setModalVisible(false)}
87
+ onPress={() => onClose}
86
88
  style={style('modalCloseButton')}
87
89
  >
88
90
  <Text style={style('modalCloseText')}>X</Text>