react-crud-mobile 1.3.280 → 1.3.282
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/dist/react-crud-mobile.cjs.development.js +9 -7
- package/dist/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js +10 -8
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/UIElement.tsx +8 -5
- package/src/elements/core/UIModal.tsx +2 -3
@@ -1375,6 +1375,7 @@ function UIToast() {
|
|
1375
1375
|
|
1376
1376
|
function UIModal(props) {
|
1377
1377
|
var _theme$styles;
|
1378
|
+
var scrollRef = React.useRef(null);
|
1378
1379
|
var owner = props.scope;
|
1379
1380
|
var _useState = React.useState(0),
|
1380
1381
|
index = _useState[0],
|
@@ -1382,7 +1383,6 @@ function UIModal(props) {
|
|
1382
1383
|
var dialog = owner.currentDialog;
|
1383
1384
|
//v2
|
1384
1385
|
var curr = dialog == null ? void 0 : dialog.crud;
|
1385
|
-
var main = reactCrudUtils.ViewUtils.getCrud('view');
|
1386
1386
|
if (!dialog) {
|
1387
1387
|
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
1388
1388
|
}
|
@@ -1395,7 +1395,6 @@ function UIModal(props) {
|
|
1395
1395
|
var label = scope.getLabel();
|
1396
1396
|
var theme = scope.getTheme();
|
1397
1397
|
var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
|
1398
|
-
var scrollRef = React.useRef(null);
|
1399
1398
|
var headerRight = reactCrudUtils.ComponentUtils.getDefine(props, 'header', 'right');
|
1400
1399
|
var bottom = reactCrudUtils.ComponentUtils.getDefine(props, 'bottom');
|
1401
1400
|
var style = function style(part, extra) {
|
@@ -2297,14 +2296,17 @@ function UIElement(props) {
|
|
2297
2296
|
scope.update();
|
2298
2297
|
};
|
2299
2298
|
scope.dialogHide = function (args) {
|
2299
|
+
var _next$scope, _current$scope;
|
2300
2300
|
var main = reactCrudUtils.ViewUtils.getCrud('view');
|
2301
2301
|
var current = main.dialog;
|
2302
2302
|
var next = reactCrudUtils.Utils.nvl(main.parent, null);
|
2303
2303
|
main.dialog = next;
|
2304
2304
|
scope.currentDialog = next;
|
2305
|
-
|
2305
|
+
var nextScope = next == null || (_next$scope = next.scope) == null ? void 0 : _next$scope.parent;
|
2306
|
+
var currScope = current == null || (_current$scope = current.scope) == null ? void 0 : _current$scope.parent;
|
2307
|
+
if (currScope) {
|
2306
2308
|
var close = current.close;
|
2307
|
-
|
2309
|
+
currScope.update();
|
2308
2310
|
if (close) {
|
2309
2311
|
if (close != null && close.debug) console.log('Fechando');
|
2310
2312
|
current.scope.call('close', {
|
@@ -2312,8 +2314,8 @@ function UIElement(props) {
|
|
2312
2314
|
});
|
2313
2315
|
}
|
2314
2316
|
}
|
2315
|
-
if (
|
2316
|
-
|
2317
|
+
if (nextScope) {
|
2318
|
+
nextScope.update();
|
2317
2319
|
}
|
2318
2320
|
};
|
2319
2321
|
return /*#__PURE__*/jsxRuntime.jsx(CrudContext.Provider, {
|
@@ -2345,7 +2347,7 @@ var boxStyle = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
2345
2347
|
}
|
2346
2348
|
});
|
2347
2349
|
var box = /*#__PURE__*/_extends({}, boxStyle.box);
|
2348
|
-
//
|
2350
|
+
//v4
|
2349
2351
|
var elementStyle = {};
|
2350
2352
|
elementStyle.view = {
|
2351
2353
|
inner: {
|