react-crud-mobile 1.3.275 → 1.3.276

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