react-crud-mobile 1.3.375 → 1.3.377
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 +12 -6
- 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 +12 -6
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIOrder.tsx +13 -4
- package/dist/elements/core/UIDraggableList.d.ts +0 -3
- package/src/elements/core/UIDraggableList.tsx +0 -255
@@ -1752,6 +1752,13 @@ function UIOrder(props) {
|
|
1752
1752
|
}).start();
|
1753
1753
|
});
|
1754
1754
|
}, [items]);
|
1755
|
+
var onChange = function onChange(updated) {
|
1756
|
+
var array = [];
|
1757
|
+
Utils.each(updated, function (o) {
|
1758
|
+
array.push(o.object);
|
1759
|
+
});
|
1760
|
+
scope.changeValue(array);
|
1761
|
+
};
|
1755
1762
|
var createPanResponder = function createPanResponder(item) {
|
1756
1763
|
return PanResponder.create({
|
1757
1764
|
onStartShouldSetPanResponder: function onStartShouldSetPanResponder() {
|
@@ -1806,6 +1813,7 @@ function UIOrder(props) {
|
|
1806
1813
|
updated.splice(newIndex, 0, removed);
|
1807
1814
|
// Atualiza o state com a nova ordem.
|
1808
1815
|
setItems(updated);
|
1816
|
+
onChange(updated);
|
1809
1817
|
// A animação final agora está no useEffect, mas fazemos a limpeza das refs.
|
1810
1818
|
setDraggingId(null);
|
1811
1819
|
activeItem.current = null;
|
@@ -1843,15 +1851,13 @@ function UIOrder(props) {
|
|
1843
1851
|
useNativeDriver: false
|
1844
1852
|
}).start();
|
1845
1853
|
});
|
1854
|
+
onChange(updated);
|
1846
1855
|
return updated;
|
1847
1856
|
});
|
1848
1857
|
};
|
1849
|
-
return /*#__PURE__*/
|
1858
|
+
return /*#__PURE__*/jsx(View, {
|
1850
1859
|
style: styles$a.container,
|
1851
|
-
children:
|
1852
|
-
style: styles$a.title,
|
1853
|
-
children: "Lista Drag\xE1vel (Esperando que a corre\xE7\xE3o final funcione \uD83D\uDE4F)"
|
1854
|
-
}), /*#__PURE__*/jsx(View, {
|
1860
|
+
children: /*#__PURE__*/jsx(View, {
|
1855
1861
|
style: {
|
1856
1862
|
height: items.length * ITEM_HEIGHT,
|
1857
1863
|
width: '100%'
|
@@ -1896,7 +1902,7 @@ function UIOrder(props) {
|
|
1896
1902
|
})]
|
1897
1903
|
}), item.value);
|
1898
1904
|
})
|
1899
|
-
})
|
1905
|
+
})
|
1900
1906
|
});
|
1901
1907
|
}
|
1902
1908
|
var styles$a = /*#__PURE__*/StyleSheet.create({
|