react-crud-mobile 1.3.91 → 1.3.94

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.
@@ -1328,7 +1328,7 @@ function UIToast() {
1328
1328
 
1329
1329
  var _excluded = ["scope", "open", "dialog"];
1330
1330
  function UIModal(_ref) {
1331
- var _theme$styles, _scope$currentDialog2, _main$dialog2;
1331
+ var _theme$styles, _scope$currentDialog2, _main$dialog3;
1332
1332
  var scope = _ref.scope,
1333
1333
  open = _ref.open,
1334
1334
  dialog = _ref.dialog,
@@ -1365,6 +1365,7 @@ function UIModal(_ref) {
1365
1365
  setIndex(++index);
1366
1366
  };
1367
1367
  scope.dialogShow = function (args) {
1368
+ var parent = main.dialog;
1368
1369
  var crud = args.crud;
1369
1370
  var name = scope.getName('modal');
1370
1371
  var edit = args.edit === true;
@@ -1383,26 +1384,28 @@ function UIModal(_ref) {
1383
1384
  parent: crud,
1384
1385
  root: crud,
1385
1386
  name: name,
1386
- dialog: main.dialog,
1387
1387
  data: data,
1388
1388
  edit: edit,
1389
1389
  scope: scope
1390
1390
  }, def));
1391
- main.dialog = d;
1392
- scope.currentDialog = {
1393
- crud: d
1391
+ var dialog = {
1392
+ crud: d,
1393
+ parent: parent
1394
1394
  };
1395
+ main.dialog = dialog;
1396
+ scope.currentDialog = dialog;
1395
1397
  toggle(true);
1396
1398
  scope.update();
1397
1399
  };
1398
1400
  scope.dialogHide = function (args) {
1399
1401
  var _main$dialog;
1400
1402
  var old = scope.currentDialog;
1401
- main.dialog = Utils.nvl(old.dialog, null);
1403
+ main.dialog = Utils.nvl(old.parent, null);
1402
1404
  scope.currentDialog = null;
1403
1405
  toggle(false);
1404
- if ((_main$dialog = main.dialog) != null && _main$dialog.scope) {
1405
- main.dialog.scope.update();
1406
+ if ((_main$dialog = main.dialog) != null && (_main$dialog = _main$dialog.crud) != null && _main$dialog.scope) {
1407
+ var _main$dialog2;
1408
+ (_main$dialog2 = main.dialog) == null || _main$dialog2.crud.scope.update();
1406
1409
  }
1407
1410
  scope.update();
1408
1411
  };
@@ -1410,7 +1413,7 @@ function UIModal(_ref) {
1410
1413
  if (!curr) {
1411
1414
  return /*#__PURE__*/jsx(Fragment, {});
1412
1415
  }
1413
- if (curr.uuid !== ((_main$dialog2 = main.dialog) == null ? void 0 : _main$dialog2.uuid)) {
1416
+ if (curr.uuid !== ((_main$dialog3 = main.dialog) == null || (_main$dialog3 = _main$dialog3.crud) == null ? void 0 : _main$dialog3.uuid)) {
1414
1417
  return /*#__PURE__*/jsx(Fragment, {});
1415
1418
  }
1416
1419
  var headerRight = ComponentUtils.getDefine(props, 'header', 'right');
@@ -2120,6 +2123,7 @@ function UIElement(props) {
2120
2123
  var def = {};
2121
2124
  var rowItem = null;
2122
2125
  var main = ViewUtils.getCrud('view');
2126
+ var parent = main.dialog;
2123
2127
  if (crud.is('row')) {
2124
2128
  def.parent = crud.parent.parent;
2125
2129
  def.search = crud.parent;
@@ -2143,7 +2147,9 @@ function UIElement(props) {
2143
2147
  main.dialog = d;
2144
2148
  scope.currentDialog = {
2145
2149
  component: component,
2146
- crud: d
2150
+ crud: d,
2151
+ scope: scope,
2152
+ parent: parent
2147
2153
  };
2148
2154
  scope.update();
2149
2155
  }