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.
@@ -1337,7 +1337,7 @@ function UIToast() {
1337
1337
 
1338
1338
  var _excluded = ["scope", "open", "dialog"];
1339
1339
  function UIModal(_ref) {
1340
- var _theme$styles, _scope$currentDialog2, _main$dialog2;
1340
+ var _theme$styles, _scope$currentDialog2, _main$dialog3;
1341
1341
  var scope = _ref.scope,
1342
1342
  open = _ref.open,
1343
1343
  dialog = _ref.dialog,
@@ -1374,6 +1374,7 @@ function UIModal(_ref) {
1374
1374
  setIndex(++index);
1375
1375
  };
1376
1376
  scope.dialogShow = function (args) {
1377
+ var parent = main.dialog;
1377
1378
  var crud = args.crud;
1378
1379
  var name = scope.getName('modal');
1379
1380
  var edit = args.edit === true;
@@ -1392,26 +1393,28 @@ function UIModal(_ref) {
1392
1393
  parent: crud,
1393
1394
  root: crud,
1394
1395
  name: name,
1395
- dialog: main.dialog,
1396
1396
  data: data,
1397
1397
  edit: edit,
1398
1398
  scope: scope
1399
1399
  }, def));
1400
- main.dialog = d;
1401
- scope.currentDialog = {
1402
- crud: d
1400
+ var dialog = {
1401
+ crud: d,
1402
+ parent: parent
1403
1403
  };
1404
+ main.dialog = dialog;
1405
+ scope.currentDialog = dialog;
1404
1406
  toggle(true);
1405
1407
  scope.update();
1406
1408
  };
1407
1409
  scope.dialogHide = function (args) {
1408
1410
  var _main$dialog;
1409
1411
  var old = scope.currentDialog;
1410
- main.dialog = reactCrudUtils.Utils.nvl(old.dialog, null);
1412
+ main.dialog = reactCrudUtils.Utils.nvl(old.parent, null);
1411
1413
  scope.currentDialog = null;
1412
1414
  toggle(false);
1413
- if ((_main$dialog = main.dialog) != null && _main$dialog.scope) {
1414
- main.dialog.scope.update();
1415
+ if ((_main$dialog = main.dialog) != null && (_main$dialog = _main$dialog.crud) != null && _main$dialog.scope) {
1416
+ var _main$dialog2;
1417
+ (_main$dialog2 = main.dialog) == null || _main$dialog2.crud.scope.update();
1415
1418
  }
1416
1419
  scope.update();
1417
1420
  };
@@ -1419,7 +1422,7 @@ function UIModal(_ref) {
1419
1422
  if (!curr) {
1420
1423
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
1421
1424
  }
1422
- if (curr.uuid !== ((_main$dialog2 = main.dialog) == null ? void 0 : _main$dialog2.uuid)) {
1425
+ if (curr.uuid !== ((_main$dialog3 = main.dialog) == null || (_main$dialog3 = _main$dialog3.crud) == null ? void 0 : _main$dialog3.uuid)) {
1423
1426
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
1424
1427
  }
1425
1428
  var headerRight = reactCrudUtils.ComponentUtils.getDefine(props, 'header', 'right');
@@ -2129,6 +2132,7 @@ function UIElement(props) {
2129
2132
  var def = {};
2130
2133
  var rowItem = null;
2131
2134
  var main = reactCrudUtils.ViewUtils.getCrud('view');
2135
+ var parent = main.dialog;
2132
2136
  if (crud.is('row')) {
2133
2137
  def.parent = crud.parent.parent;
2134
2138
  def.search = crud.parent;
@@ -2152,7 +2156,9 @@ function UIElement(props) {
2152
2156
  main.dialog = d;
2153
2157
  scope.currentDialog = {
2154
2158
  component: component,
2155
- crud: d
2159
+ crud: d,
2160
+ scope: scope,
2161
+ parent: parent
2156
2162
  };
2157
2163
  scope.update();
2158
2164
  }