react-crud-mobile 1.3.233 → 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.
- package/dist/react-crud-mobile.cjs.development.js +7 -3
- package/dist/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js +7 -3
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIList.tsx +9 -4
@@ -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 (!
|
1061
|
+
if (!isEmpty) {
|
1060
1062
|
return true;
|
1061
1063
|
}
|
1062
1064
|
return hideAddWhenEmpty !== true;
|
1063
1065
|
};
|
1064
1066
|
var Empty = function Empty() {
|
1065
|
-
if (!
|
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) {
|