react-crud-mobile 1.3.112 → 1.3.115

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.
@@ -1356,7 +1356,6 @@ function UIModal(_ref) {
1356
1356
  index = _useState2[0],
1357
1357
  setIndex = _useState2[1];
1358
1358
  //v6
1359
- var label = scope.getLabel();
1360
1359
  var theme = scope.getTheme();
1361
1360
  var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
1362
1361
  var scrollRef = React.useRef(null);
@@ -1387,6 +1386,15 @@ function UIModal(_ref) {
1387
1386
  if (curr.uuid !== ((_main$dialog = main.dialog) == null || (_main$dialog = _main$dialog.crud) == null ? void 0 : _main$dialog.uuid)) {
1388
1387
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
1389
1388
  }
1389
+ var dialogLabel = reactCrudUtils.Utils.nvl(dialog == null ? void 0 : dialog.label, scope.getLabel());
1390
+ var _useState3 = React.useState(reactCrudUtils.ScopeUtils.create({
1391
+ parent: scope,
1392
+ crud: curr,
1393
+ label: dialogLabel
1394
+ })),
1395
+ dialogScope = _useState3[0];
1396
+ console.log(dialogLabel); //v2
1397
+ var label = dialogScope.getLabel();
1390
1398
  var headerRight = reactCrudUtils.ComponentUtils.getDefine(props, 'header', 'right');
1391
1399
  var bottom = reactCrudUtils.ComponentUtils.getDefine(props, 'bottom');
1392
1400
  scope.put('scrollRef', scrollRef);
@@ -2087,7 +2095,7 @@ function UIElement(props) {
2087
2095
  });
2088
2096
  };
2089
2097
  scope.dialogShow = function (args) {
2090
- var _args$event;
2098
+ var _args$event, _args$event2;
2091
2099
  var main = reactCrudUtils.ViewUtils.getCrud('view');
2092
2100
  var parent = main.dialog;
2093
2101
  var crud = args.crud;
@@ -2095,7 +2103,8 @@ function UIElement(props) {
2095
2103
  var edit = args.edit === true;
2096
2104
  var def = {};
2097
2105
  var rowItem = null;
2098
- var component = args == null || (_args$event = args.event) == null ? void 0 : _args$event.component;
2106
+ var label = args == null || (_args$event = args.event) == null ? void 0 : _args$event.title;
2107
+ var component = args == null || (_args$event2 = args.event) == null ? void 0 : _args$event2.component;
2099
2108
  if (crud.is('row')) {
2100
2109
  def.parent = crud.parent.parent;
2101
2110
  def.search = crud.parent;
@@ -2116,7 +2125,8 @@ function UIElement(props) {
2116
2125
  var dialog = {
2117
2126
  crud: d,
2118
2127
  parent: parent,
2119
- component: component
2128
+ component: component,
2129
+ label: label
2120
2130
  };
2121
2131
  main.dialog = dialog;
2122
2132
  scope.toggleDialog(true);