react-crud-mobile 1.3.215 → 1.3.217

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.215",
3
+ "version": "1.3.217",
4
4
  "license": "MIT",
5
5
  "description": "Uma biblioteca de componentes para React Native",
6
6
  "main": "dist/index.js",
@@ -84,22 +84,6 @@ export default function UIModal({
84
84
  let defaults = { color };
85
85
  let key = `${curr.name}-${index}`;
86
86
 
87
- let Content = () => {
88
- if (dialog?.component) {
89
- let Aux = dialog?.component;
90
-
91
- console.log(Aux);
92
-
93
- return <Aux key={curr.uuid} crud={curr} />;
94
- }
95
-
96
- return (
97
- <UIChildren scope={scope} crud={curr}>
98
- {props.children}
99
- </UIChildren>
100
- );
101
- };
102
-
103
87
  let ModalContent = ({ children }) => {
104
88
  let disableScroll = scope.part('disableScroll', false);
105
89
  let disableContent = scope.part('disableContent', false);
@@ -139,14 +123,31 @@ export default function UIModal({
139
123
  };
140
124
 
141
125
  const ModalInner = () => {
142
- if (original.transient) {
126
+ let Content = () => {
127
+ if (dialog?.component) {
128
+ let Aux = dialog?.component;
129
+
130
+ let x = Aux({ crud: dialog.crud, scope: dialog.scope });
131
+
132
+ console.log(x);
133
+ return <Aux key={curr.uuid} crud={curr} />;
134
+ }
135
+
143
136
  return (
144
- <View style={style('modalSafe')}>
145
- <Content />
146
- </View>
137
+ <UIChildren scope={scope} crud={curr}>
138
+ {props.children}
139
+ </UIChildren>
147
140
  );
141
+ };
142
+
143
+ let content = <Content />;
144
+
145
+ if (original.transient) {
146
+ return <View style={style('modalSafe')}>{content}</View>;
148
147
  }
149
148
 
149
+ console.log(content);
150
+
150
151
  return (
151
152
  <>
152
153
  <SafeAreaView style={style('modalTop')} />
@@ -170,9 +171,7 @@ export default function UIModal({
170
171
  </UIChildren>
171
172
  )}
172
173
  </View>
173
- <ModalContent>
174
- <Content />
175
- </ModalContent>
174
+ <ModalContent>{content}</ModalContent>
176
175
  {bottom}
177
176
  </SafeAreaView>
178
177
  <UIToast />