react-crud-mobile 1.3.274 → 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.
@@ -2273,7 +2273,8 @@ function UIElement(props) {
2273
2273
  if (event.header) el.header = event.header;
2274
2274
  if (event.label) el.label = event.label;
2275
2275
  if (event.title) el.title = event.title;
2276
- el.label = reactCrudUtils.Utils.nvl(el.title, el.label);
2276
+ var label = reactCrudUtils.Utils.nvl(el.title, el.label);
2277
+ el.label = label;
2277
2278
  var dialogScope = reactCrudUtils.ScopeUtils.create(_extends({
2278
2279
  parent: scope,
2279
2280
  crud: d
@@ -2282,6 +2283,7 @@ function UIElement(props) {
2282
2283
  }));
2283
2284
  var dialog = {
2284
2285
  crud: d,
2286
+ label: label,
2285
2287
  parent: parent,
2286
2288
  component: component,
2287
2289
  scope: dialogScope,
@@ -2297,26 +2299,27 @@ function UIElement(props) {
2297
2299
  scope.dialogHide = function (args) {
2298
2300
  var _main$dialog;
2299
2301
  var main = reactCrudUtils.ViewUtils.getCrud('view');
2300
- var old = scope.currentDialog;
2301
- var parentScope = old.scope.parent;
2302
- main.dialog = reactCrudUtils.Utils.nvl(old.parent, null);
2303
- scope.currentDialog = null;
2304
- console.log(scope);
2302
+ var current = main.dialog;
2303
+ var next = reactCrudUtils.Utils.nvl(main.parent, null);
2304
+ main.dialog = next;
2305
+ scope.currentDialog = next;
2305
2306
  if ((_main$dialog = main.dialog) != null && (_main$dialog = _main$dialog.crud) != null && _main$dialog.scope) {
2306
2307
  var _main$dialog2;
2307
2308
  (_main$dialog2 = main.dialog) == null || _main$dialog2.crud.scope.update();
2308
2309
  }
2309
- scope.update();
2310
- if (parentScope) {
2311
- var close = old.close;
2312
- parentScope.update();
2310
+ if (current != null && current.scope) {
2311
+ var close = current.close;
2312
+ current.scope.update();
2313
2313
  if (close) {
2314
2314
  if (close != null && close.debug) console.log('Fechando');
2315
- parentScope.call('close', {
2315
+ current.scope.call('close', {
2316
2316
  close: close
2317
2317
  });
2318
2318
  }
2319
2319
  }
2320
+ if (next.scope.update()) {
2321
+ next.scope.update();
2322
+ }
2320
2323
  };
2321
2324
  return /*#__PURE__*/jsxRuntime.jsx(CrudContext.Provider, {
2322
2325
  value: {