react-crud-mobile 1.3.232 → 1.3.233
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 +5 -1
- 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 +5 -1
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIList.tsx +7 -2
package/package.json
CHANGED
@@ -13,6 +13,7 @@ export default function UIList(props: ChildType) {
|
|
13
13
|
const styles = { repeat: stylesRepeat, list: stylesList }?.[original.type];
|
14
14
|
const add = ComponentUtils.getDefine(props, 'add');
|
15
15
|
const hideAddWhenEmpty = original.hideAddWhenEmpty;
|
16
|
+
const hideEmpty = original.hideEmpty;
|
16
17
|
|
17
18
|
//v2
|
18
19
|
const getStyle = (key: string, extra?: any) => {
|
@@ -38,8 +39,6 @@ export default function UIList(props: ChildType) {
|
|
38
39
|
setIndex(index);
|
39
40
|
};
|
40
41
|
|
41
|
-
let keyData = scope.key('data');
|
42
|
-
|
43
42
|
const items = Utils.call(() => {
|
44
43
|
let list = Utils.nvl(scope.getItems(), []);
|
45
44
|
|
@@ -122,6 +121,12 @@ export default function UIList(props: ChildType) {
|
|
122
121
|
);
|
123
122
|
};
|
124
123
|
|
124
|
+
let items = Utils.nvl(scope.getItems(), []);
|
125
|
+
|
126
|
+
if (hideEmpty && Utils.isEmpty(items)) {
|
127
|
+
return <></>;
|
128
|
+
}
|
129
|
+
|
125
130
|
return (
|
126
131
|
<>
|
127
132
|
{original.search !== false && (
|