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.
@@ -1760,6 +1760,13 @@ function UIOrder(props) {
1760
1760
  }).start();
1761
1761
  });
1762
1762
  }, [items]);
1763
+ var onChange = function onChange(updated) {
1764
+ var array = [];
1765
+ reactCrudUtils.Utils.each(updated, function (o) {
1766
+ array.push(o.object);
1767
+ });
1768
+ scope.changeValue(array);
1769
+ };
1763
1770
  var createPanResponder = function createPanResponder(item) {
1764
1771
  return reactNative.PanResponder.create({
1765
1772
  onStartShouldSetPanResponder: function onStartShouldSetPanResponder() {
@@ -1814,6 +1821,7 @@ function UIOrder(props) {
1814
1821
  updated.splice(newIndex, 0, removed);
1815
1822
  // Atualiza o state com a nova ordem.
1816
1823
  setItems(updated);
1824
+ onChange(updated);
1817
1825
  // A animação final agora está no useEffect, mas fazemos a limpeza das refs.
1818
1826
  setDraggingId(null);
1819
1827
  activeItem.current = null;
@@ -1851,6 +1859,7 @@ function UIOrder(props) {
1851
1859
  useNativeDriver: false
1852
1860
  }).start();
1853
1861
  });
1862
+ onChange(updated);
1854
1863
  return updated;
1855
1864
  });
1856
1865
  };