react-crud-mobile 1.3.147 → 1.3.149

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-crud-mobile",
3
- "version": "1.3.147",
3
+ "version": "1.3.149",
4
4
  "license": "MIT",
5
5
  "description": "Uma biblioteca de componentes para React Native",
6
6
  "main": "dist/index.js",
@@ -34,7 +34,7 @@ export default function UIModal({
34
34
  }: UIModalType) {
35
35
  let [modalVisible, setModalVisible] = useState(open === true);
36
36
  let [index, setIndex] = useState(0);
37
- //v6
37
+ //v8
38
38
 
39
39
  const label = scope.getLabel();
40
40
  const theme = scope.getTheme();
@@ -76,6 +76,8 @@ export default function UIModal({
76
76
 
77
77
  scope.put('scrollRef', scrollRef);
78
78
 
79
+ const original = scope.original;
80
+
79
81
  ComponentUtils.setViewScope(scope);
80
82
 
81
83
  let color = Utils.nvl(headerStyle.color, 'white');
@@ -124,8 +126,6 @@ export default function UIModal({
124
126
  };
125
127
 
126
128
  const ModalView = ({ children }) => {
127
- const original = scope.original;
128
-
129
129
  if (original.gesture) {
130
130
  return (
131
131
  <GestureHandlerRootView
@@ -139,15 +139,14 @@ export default function UIModal({
139
139
  }
140
140
  return <>{children}</>;
141
141
  };
142
- return (
143
- <ModalView>
144
- <Modal
145
- key={key}
146
- animationType="slide"
147
- transparent={true}
148
- visible={modalVisible}
149
- onRequestClose={onClose}
150
- >
142
+
143
+ const ModalInner = () => {
144
+ if (original.transient) {
145
+ return <Content />;
146
+ }
147
+
148
+ return (
149
+ <>
151
150
  <SafeAreaView style={style('modalTop')} />
152
151
  <SafeAreaView style={style('modalSafe')}>
153
152
  <View style={scope.getStyle('header', headerStyle)}>
@@ -185,6 +184,19 @@ export default function UIModal({
185
184
  {bottom}
186
185
  </SafeAreaView>
187
186
  <UIToast />
187
+ </>
188
+ );
189
+ };
190
+ return (
191
+ <ModalView>
192
+ <Modal
193
+ key={key}
194
+ animationType="slide"
195
+ transparent={true}
196
+ visible={modalVisible}
197
+ onRequestClose={onClose}
198
+ >
199
+ <ModalInner />
188
200
  </Modal>
189
201
  </ModalView>
190
202
  );