react-crud-mobile 1.3.275 → 1.3.277

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.
@@ -2288,28 +2288,24 @@ function UIElement(props) {
2288
2288
  scope.update();
2289
2289
  };
2290
2290
  scope.dialogHide = function (args) {
2291
- var _main$dialog;
2292
2291
  var main = ViewUtils.getCrud('view');
2293
- var old = scope.currentDialog;
2294
- var parentScope = old.scope.parent;
2295
- main.dialog = Utils.nvl(old.parent, null);
2296
- scope.currentDialog = null;
2297
- console.log(scope);
2298
- if ((_main$dialog = main.dialog) != null && (_main$dialog = _main$dialog.crud) != null && _main$dialog.scope) {
2299
- var _main$dialog2;
2300
- (_main$dialog2 = main.dialog) == null || _main$dialog2.crud.scope.update();
2301
- }
2302
- scope.update();
2303
- if (parentScope) {
2304
- var close = old.close;
2305
- parentScope.update();
2292
+ var current = main.dialog;
2293
+ var next = Utils.nvl(main.parent, null);
2294
+ main.dialog = next;
2295
+ scope.currentDialog = next;
2296
+ if (current != null && current.scope) {
2297
+ var close = current.close;
2298
+ current.scope.update();
2306
2299
  if (close) {
2307
2300
  if (close != null && close.debug) console.log('Fechando');
2308
- parentScope.call('close', {
2301
+ current.scope.call('close', {
2309
2302
  close: close
2310
2303
  });
2311
2304
  }
2312
2305
  }
2306
+ if (next != null && next.scope) {
2307
+ next.scope.update();
2308
+ }
2313
2309
  };
2314
2310
  return /*#__PURE__*/jsx(CrudContext.Provider, {
2315
2311
  value: {