react-crud-mobile 1.3.378 → 1.3.380
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 -2
- 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 -2
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIOrder.tsx +10 -3
@@ -1720,6 +1720,7 @@ var styles$9 = /*#__PURE__*/StyleSheet.create({
|
|
1720
1720
|
var ITEM_HEIGHT = 70;
|
1721
1721
|
function UIOrder(props) {
|
1722
1722
|
var scope = props.scope;
|
1723
|
+
var element = scope.original;
|
1723
1724
|
var initial = scope.getOptions();
|
1724
1725
|
var _useState = useState(initial),
|
1725
1726
|
items = _useState[0],
|
@@ -1754,8 +1755,12 @@ function UIOrder(props) {
|
|
1754
1755
|
}, [items]);
|
1755
1756
|
var onChange = function onChange(updated) {
|
1756
1757
|
var array = [];
|
1758
|
+
var items = scope.getItems();
|
1759
|
+
items.splice(0);
|
1757
1760
|
Utils.each(updated, function (o) {
|
1758
|
-
|
1761
|
+
var v = o.object;
|
1762
|
+
array.push(v);
|
1763
|
+
items.push(v);
|
1759
1764
|
});
|
1760
1765
|
scope.changeValue(array);
|
1761
1766
|
};
|
@@ -1888,7 +1893,7 @@ function UIOrder(props) {
|
|
1888
1893
|
}), /*#__PURE__*/jsx(Text, {
|
1889
1894
|
style: styles$a.itemText,
|
1890
1895
|
children: item.label
|
1891
|
-
}),
|
1896
|
+
}), element.remove && /*#__PURE__*/jsx(TouchableOpacity, {
|
1892
1897
|
onPress: function onPress() {
|
1893
1898
|
return removeItem(item.value);
|
1894
1899
|
},
|