react-crud-mobile 1.0.480 → 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.
@@ -22,6 +22,7 @@ export default function UIModal(props: ChildType) {
22
22
  let [modalVisible, setModalVisible] = useState(false);
23
23
 
24
24
  const scope = props.scope;
25
+ const crud = scope.crud;
25
26
  const label = scope.getLabel();
26
27
  const theme = useTheme();
27
28
 
@@ -69,17 +70,21 @@ export default function UIModal(props: ChildType) {
69
70
  return <></>;
70
71
  }
71
72
 
73
+ let onClose = () => {
74
+ scope.close({ scope, crud, event: {} });
75
+ };
76
+
72
77
  return (
73
78
  <Modal
74
79
  animationType="slide"
75
80
  transparent={true}
76
81
  visible={modalVisible}
77
- onRequestClose={() => setModalVisible(false)}
82
+ onRequestClose={() => onClose}
78
83
  >
79
84
  <SafeAreaView style={style('modalSafe')}>
80
85
  <View style={style('modalHeader')}>
81
86
  <TouchableOpacity
82
- onPress={() => setModalVisible(false)}
87
+ onPress={() => onClose}
83
88
  style={style('modalCloseButton')}
84
89
  >
85
90
  <Text style={style('modalCloseText')}>X</Text>