react-crud-mobile 1.3.233 → 1.3.235

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.
@@ -1030,6 +1030,7 @@ function UIList(props) {
1030
1030
  var _useState = React.useState(scope.updateIndex),
1031
1031
  index = _useState[0],
1032
1032
  setIndex = _useState[1];
1033
+ var empty = scope.attr('empty', 'Sem registro');
1033
1034
  scope.update = function () {
1034
1035
  scope.updateIndex = ++index;
1035
1036
  setIndex(index);
@@ -1055,17 +1056,17 @@ function UIList(props) {
1055
1056
  }
1056
1057
  return list;
1057
1058
  });
1059
+ var isEmpty = reactCrudUtils.Utils.isEmpty(items);
1058
1060
  var isShowAdd = function isShowAdd() {
1059
- if (!reactCrudUtils.Utils.isEmpty(items)) {
1061
+ if (!isEmpty) {
1060
1062
  return true;
1061
1063
  }
1062
1064
  return hideAddWhenEmpty !== true;
1063
1065
  };
1064
1066
  var Empty = function Empty() {
1065
- if (!reactCrudUtils.Utils.isEmpty(items)) {
1067
+ if (!isEmpty) {
1066
1068
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
1067
1069
  }
1068
- var empty = scope.attr('empty', 'Sem registro');
1069
1070
  if (!empty) {
1070
1071
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
1071
1072
  }
@@ -1088,6 +1089,9 @@ function UIList(props) {
1088
1089
  children: empty
1089
1090
  });
1090
1091
  };
1092
+ if (empty === false && isEmpty) {
1093
+ return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
1094
+ }
1091
1095
  return /*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
1092
1096
  style: getContainerStyle(),
1093
1097
  children: [/*#__PURE__*/jsxRuntime.jsx(Empty, {}), items.map(function (item, i) {
@@ -2198,6 +2202,13 @@ function UIElement(props) {
2198
2202
  };
2199
2203
  var Card = function Card(props) {
2200
2204
  var isCard = scope.is('type|layout', 'card');
2205
+ if (scope.isType('list')) {
2206
+ var empty = scope.getPart('empty', null, undefined);
2207
+ var items = scope.getItems();
2208
+ if (empty === false && reactCrudUtils.Utils.isEmpty(items)) {
2209
+ isCard = false;
2210
+ }
2211
+ }
2201
2212
  if (isCard) {
2202
2213
  var _box = _extends({}, getStyle('box', _extends({}, boxStyle.box, {
2203
2214
  alignSelf: 'stretch'