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.
@@ -2264,7 +2264,8 @@ function UIElement(props) {
2264
2264
  if (event.header) el.header = event.header;
2265
2265
  if (event.label) el.label = event.label;
2266
2266
  if (event.title) el.title = event.title;
2267
- el.label = Utils.nvl(el.title, el.label);
2267
+ var label = Utils.nvl(el.title, el.label);
2268
+ el.label = label;
2268
2269
  var dialogScope = ScopeUtils.create(_extends({
2269
2270
  parent: scope,
2270
2271
  crud: d
@@ -2273,6 +2274,7 @@ function UIElement(props) {
2273
2274
  }));
2274
2275
  var dialog = {
2275
2276
  crud: d,
2277
+ label: label,
2276
2278
  parent: parent,
2277
2279
  component: component,
2278
2280
  scope: dialogScope,
@@ -2288,26 +2290,27 @@ function UIElement(props) {
2288
2290
  scope.dialogHide = function (args) {
2289
2291
  var _main$dialog;
2290
2292
  var main = ViewUtils.getCrud('view');
2291
- var old = scope.currentDialog;
2292
- var parentScope = old.scope.parent;
2293
- main.dialog = Utils.nvl(old.parent, null);
2294
- scope.currentDialog = null;
2295
- console.log(scope);
2293
+ var current = main.dialog;
2294
+ var next = Utils.nvl(main.parent, null);
2295
+ main.dialog = next;
2296
+ scope.currentDialog = next;
2296
2297
  if ((_main$dialog = main.dialog) != null && (_main$dialog = _main$dialog.crud) != null && _main$dialog.scope) {
2297
2298
  var _main$dialog2;
2298
2299
  (_main$dialog2 = main.dialog) == null || _main$dialog2.crud.scope.update();
2299
2300
  }
2300
- scope.update();
2301
- if (parentScope) {
2302
- var close = old.close;
2303
- parentScope.update();
2301
+ if (current != null && current.scope) {
2302
+ var close = current.close;
2303
+ current.scope.update();
2304
2304
  if (close) {
2305
2305
  if (close != null && close.debug) console.log('Fechando');
2306
- parentScope.call('close', {
2306
+ current.scope.call('close', {
2307
2307
  close: close
2308
2308
  });
2309
2309
  }
2310
2310
  }
2311
+ if (next.scope.update()) {
2312
+ next.scope.update();
2313
+ }
2311
2314
  };
2312
2315
  return /*#__PURE__*/jsx(CrudContext.Provider, {
2313
2316
  value: {