react-crud-mobile 1.0.558 → 1.0.559
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 +24 -7
- 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 +24 -7
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIList.tsx +24 -9
|
@@ -83,6 +83,28 @@ export default function UIList(props: ChildType) {
|
|
|
83
83
|
return <>{empty}</>;
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
+
let RowItem = ({ item, index, children }) => {
|
|
87
|
+
if (!original.click) {
|
|
88
|
+
return (
|
|
89
|
+
<View key={`k-${index}`} style={getRowStyle()}>
|
|
90
|
+
{children}
|
|
91
|
+
</View>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
return (
|
|
95
|
+
<TouchableHighlight
|
|
96
|
+
key={`k-${index}`}
|
|
97
|
+
style={getRowStyle()}
|
|
98
|
+
underlayColor={'transparent'}
|
|
99
|
+
onPress={e => {
|
|
100
|
+
e.stopPropagation();
|
|
101
|
+
onClick(item);
|
|
102
|
+
}}
|
|
103
|
+
>
|
|
104
|
+
{children}
|
|
105
|
+
</TouchableHighlight>
|
|
106
|
+
);
|
|
107
|
+
};
|
|
86
108
|
return (
|
|
87
109
|
<>
|
|
88
110
|
{original.search !== false && (
|
|
@@ -97,18 +119,11 @@ export default function UIList(props: ChildType) {
|
|
|
97
119
|
<View style={getContainerStyle()}>
|
|
98
120
|
<Empty />
|
|
99
121
|
{items.map((item: any, i: number) => (
|
|
100
|
-
<
|
|
101
|
-
key={`k-${i}`}
|
|
102
|
-
style={getRowStyle()}
|
|
103
|
-
underlayColor={'transparent'}
|
|
104
|
-
onPress={e => {
|
|
105
|
-
onClick(item);
|
|
106
|
-
}}
|
|
107
|
-
>
|
|
122
|
+
<RowItem index={i} item={item}>
|
|
108
123
|
<UIListRow scope={scope} item={item} index={i}>
|
|
109
124
|
{props.children}
|
|
110
125
|
</UIListRow>
|
|
111
|
-
</
|
|
126
|
+
</RowItem>
|
|
112
127
|
))}
|
|
113
128
|
{isShowAdd() && <>{add}</>}
|
|
114
129
|
</View>
|