react-crud-mobile 1.3.379 → 1.3.381

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.
@@ -1755,8 +1755,12 @@ function UIOrder(props) {
1755
1755
  }, [items]);
1756
1756
  var onChange = function onChange(updated) {
1757
1757
  var array = [];
1758
+ var items = scope.getItems();
1759
+ items.splice(0);
1758
1760
  Utils.each(updated, function (o) {
1759
- array.push(o.object);
1761
+ var v = o.object;
1762
+ array.push(v);
1763
+ items.push(v);
1760
1764
  });
1761
1765
  scope.changeValue(array);
1762
1766
  };
@@ -1856,9 +1860,18 @@ function UIOrder(props) {
1856
1860
  return updated;
1857
1861
  });
1858
1862
  };
1859
- return /*#__PURE__*/jsx(View, {
1863
+ var Empty = function Empty() {
1864
+ if (Utils.isEmpty(items)) {
1865
+ var empty = scope.part('empty', 'Sem registro');
1866
+ if (empty !== false) return /*#__PURE__*/jsx(Fragment, {
1867
+ children: empty
1868
+ });
1869
+ }
1870
+ return /*#__PURE__*/jsx(Fragment, {});
1871
+ };
1872
+ return /*#__PURE__*/jsxs(View, {
1860
1873
  style: styles$a.container,
1861
- children: /*#__PURE__*/jsx(View, {
1874
+ children: [/*#__PURE__*/jsx(Empty, {}), /*#__PURE__*/jsx(View, {
1862
1875
  style: {
1863
1876
  height: items.length * ITEM_HEIGHT,
1864
1877
  width: '100%'
@@ -1868,8 +1881,9 @@ function UIOrder(props) {
1868
1881
  var y = positions[item.value];
1869
1882
  if (!y) return null;
1870
1883
  var isDragging = draggingId === item.value;
1884
+ var itemStyle = scope.getStyle('row', _extends({}, styles$a.item));
1871
1885
  return /*#__PURE__*/jsxs(Animated.View, _extends({}, (_panRespondersRef$cur = (_panRespondersRef$cur2 = panRespondersRef.current[item.value]) == null ? void 0 : _panRespondersRef$cur2.panHandlers) != null ? _panRespondersRef$cur : {}, {
1872
- style: [styles$a.item, {
1886
+ style: [itemStyle, {
1873
1887
  position: 'absolute',
1874
1888
  left: 0,
1875
1889
  right: 0,
@@ -1903,7 +1917,7 @@ function UIOrder(props) {
1903
1917
  })]
1904
1918
  }), item.value);
1905
1919
  })
1906
- })
1920
+ })]
1907
1921
  });
1908
1922
  }
1909
1923
  var styles$a = /*#__PURE__*/StyleSheet.create({