react-crud-mobile 1.3.260 → 1.3.261

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.260",
3
+ "version": "1.3.261",
4
4
  "license": "MIT",
5
5
  "description": "Uma biblioteca de componentes para React Native",
6
6
  "main": "dist/index.js",
@@ -30,15 +30,30 @@ export default function UIModal(props: UIModalType) {
30
30
  let owner = props.scope;
31
31
  let [index, setIndex] = useState(0);
32
32
  let dialog = owner.currentDialog;
33
- let scope = dialog.scope;
34
33
  let [modalVisible, setModalVisible] = useState(!Utils.isEmpty(dialog));
35
34
 
36
35
  //v1
37
36
 
37
+ let curr = dialog?.crud;
38
+ let main = ViewUtils.getCrud('view');
39
+
40
+ if (!dialog) {
41
+ return <></>;
42
+ }
43
+
44
+ if (dialog.debug) console.log(dialog);
45
+
46
+ if (curr.uuid !== main.dialog?.crud?.uuid) {
47
+ return <></>;
48
+ }
49
+
50
+ const scope = dialog.scope;
38
51
  const label = scope.getLabel();
39
52
  const theme = scope.getTheme();
40
53
  const headerStyle = Utils.nvl(theme.styles?.defaults?.header, {});
41
54
  const scrollRef = useRef(null);
55
+ const headerRight = ComponentUtils.getDefine(props, 'header', 'right');
56
+ const bottom = ComponentUtils.getDefine(props, 'bottom');
42
57
 
43
58
  const style = (part: string, extra?: any) => {
44
59
  let st = { ...styles[part], ...extra };
@@ -55,22 +70,6 @@ export default function UIModal(props: UIModalType) {
55
70
  setModalVisible(modalVisible);
56
71
  };
57
72
 
58
- let curr = dialog?.crud;
59
- let main = ViewUtils.getCrud('view');
60
-
61
- if (!dialog) {
62
- return <></>;
63
- }
64
-
65
- if (dialog.debug) console.log(dialog);
66
-
67
- if (curr.uuid !== main.dialog?.crud?.uuid) {
68
- return <></>;
69
- }
70
-
71
- const headerRight = ComponentUtils.getDefine(props, 'header', 'right');
72
- const bottom = ComponentUtils.getDefine(props, 'bottom');
73
-
74
73
  scope.put('scrollRef', scrollRef);
75
74
 
76
75
  const original = owner.original;