react-crud-mobile 1.3.232 → 1.3.234

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.
@@ -1002,6 +1002,7 @@ function UIList(props) {
1002
1002
  }) == null ? void 0 : _repeat$list[original.type];
1003
1003
  var add = ComponentUtils.getDefine(props, 'add');
1004
1004
  var hideAddWhenEmpty = original.hideAddWhenEmpty;
1005
+ var hideEmpty = original.hideEmpty;
1005
1006
  //v2
1006
1007
  var getStyle = function getStyle(key, extra) {
1007
1008
  return scope.getStyle(key, _extends({}, extra, styles[key]));
@@ -1020,11 +1021,11 @@ function UIList(props) {
1020
1021
  var _useState = useState(scope.updateIndex),
1021
1022
  index = _useState[0],
1022
1023
  setIndex = _useState[1];
1024
+ var empty = scope.attr('empty', 'Sem registro');
1023
1025
  scope.update = function () {
1024
1026
  scope.updateIndex = ++index;
1025
1027
  setIndex(index);
1026
1028
  };
1027
- var keyData = scope.key('data');
1028
1029
  var items = Utils.call(function () {
1029
1030
  var _original$list;
1030
1031
  var list = Utils.nvl(scope.getItems(), []);
@@ -1046,17 +1047,17 @@ function UIList(props) {
1046
1047
  }
1047
1048
  return list;
1048
1049
  });
1050
+ var isEmpty = Utils.isEmpty(items);
1049
1051
  var isShowAdd = function isShowAdd() {
1050
- if (!Utils.isEmpty(items)) {
1052
+ if (!isEmpty) {
1051
1053
  return true;
1052
1054
  }
1053
1055
  return hideAddWhenEmpty !== true;
1054
1056
  };
1055
1057
  var Empty = function Empty() {
1056
- if (!Utils.isEmpty(items)) {
1058
+ if (!isEmpty) {
1057
1059
  return /*#__PURE__*/jsx(Fragment, {});
1058
1060
  }
1059
- var empty = scope.attr('empty', 'Sem registro');
1060
1061
  if (!empty) {
1061
1062
  return /*#__PURE__*/jsx(Fragment, {});
1062
1063
  }
@@ -1079,6 +1080,9 @@ function UIList(props) {
1079
1080
  children: empty
1080
1081
  });
1081
1082
  };
1083
+ if (empty === false && isEmpty) {
1084
+ return /*#__PURE__*/jsx(Fragment, {});
1085
+ }
1082
1086
  return /*#__PURE__*/jsxs(View, {
1083
1087
  style: getContainerStyle(),
1084
1088
  children: [/*#__PURE__*/jsx(Empty, {}), items.map(function (item, i) {
@@ -1093,6 +1097,10 @@ function UIList(props) {
1093
1097
  })]
1094
1098
  });
1095
1099
  };
1100
+ var items = Utils.nvl(scope.getItems(), []);
1101
+ if (hideEmpty && Utils.isEmpty(items)) {
1102
+ return /*#__PURE__*/jsx(Fragment, {});
1103
+ }
1096
1104
  return /*#__PURE__*/jsxs(Fragment, {
1097
1105
  children: [original.search !== false && /*#__PURE__*/jsx(UI.Text, {
1098
1106
  placeholder: "Pesquisar...",