react-crud-mobile 1.3.375 → 1.3.376

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.
@@ -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,6 +1851,7 @@ function UIOrder(props) {
1843
1851
  useNativeDriver: false
1844
1852
  }).start();
1845
1853
  });
1854
+ onChange(updated);
1846
1855
  return updated;
1847
1856
  });
1848
1857
  };