react-crud-mobile 1.3.377 → 1.3.379
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 +3 -4
- 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 +3 -4
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIOrder.tsx +10 -7
package/package.json
CHANGED
@@ -13,6 +13,7 @@ const ITEM_HEIGHT = 70;
|
|
13
13
|
|
14
14
|
export default function UIOrder(props: ChildType) {
|
15
15
|
const scope = props.scope;
|
16
|
+
const element = scope.original;
|
16
17
|
const initial: OptionType[] = scope.getOptions();
|
17
18
|
|
18
19
|
const [items, setItems] = useState<OptionType[]>(initial);
|
@@ -221,12 +222,14 @@ export default function UIOrder(props: ChildType) {
|
|
221
222
|
<Text style={styles.handleText}>≡</Text>
|
222
223
|
</View>
|
223
224
|
<Text style={styles.itemText}>{item.label}</Text>
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
225
|
+
{element.remove && (
|
226
|
+
<TouchableOpacity
|
227
|
+
onPress={() => removeItem(item.value)}
|
228
|
+
style={styles.del}
|
229
|
+
>
|
230
|
+
<Text style={{ color: '#fff' }}>X</Text>
|
231
|
+
</TouchableOpacity>
|
232
|
+
)}
|
230
233
|
</Animated.View>
|
231
234
|
);
|
232
235
|
})}
|
@@ -236,7 +239,7 @@ export default function UIOrder(props: ChildType) {
|
|
236
239
|
}
|
237
240
|
|
238
241
|
const styles = StyleSheet.create({
|
239
|
-
container: { flex: 1
|
242
|
+
container: { flex: 1 },
|
240
243
|
title: { fontSize: 18, fontWeight: '600', marginBottom: 12 },
|
241
244
|
item: {
|
242
245
|
backgroundColor: '#fff',
|