react-crud-mobile 1.3.184 → 1.3.186

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.
@@ -1676,22 +1676,37 @@ function UIOrder(props) {
1676
1676
  } else {
1677
1677
  css = _extends({}, css, row.getStyle('rowUnSelected', {}));
1678
1678
  }
1679
+ var Child = function Child() {
1680
+ if (Utils.isEmpty(props.children)) {
1681
+ return /*#__PURE__*/jsxs(Fragment, {
1682
+ children: [/*#__PURE__*/jsx(MaterialCommunityIcons, {
1683
+ name: "drag",
1684
+ size: 24,
1685
+ color: "black"
1686
+ }), /*#__PURE__*/jsx(Text, {
1687
+ style: styles$a.text,
1688
+ children: scope.getItemLabel(item)
1689
+ })]
1690
+ });
1691
+ }
1692
+ return /*#__PURE__*/jsx(Fragment, {
1693
+ children: /*#__PURE__*/jsx(UIChildren, {
1694
+ "transient": true,
1695
+ scope: row,
1696
+ crud: row.crud,
1697
+ children: props.children
1698
+ })
1699
+ });
1700
+ };
1679
1701
  return /*#__PURE__*/jsx(ScaleDecorator, {
1680
- children: /*#__PURE__*/jsxs(TouchableOpacity, {
1702
+ children: /*#__PURE__*/jsx(TouchableOpacity, {
1681
1703
  style: [styles$a.row, {
1682
1704
  backgroundColor: isActive ? 'lightblue' : 'white'
1683
1705
  }, _extends({}, css)],
1684
1706
  delayLongPress: 100,
1685
1707
  onLongPress: drag // Initiate drag on long press
1686
1708
  ,
1687
- children: [/*#__PURE__*/jsx(MaterialCommunityIcons, {
1688
- name: "drag",
1689
- size: 24,
1690
- color: "black"
1691
- }), /*#__PURE__*/jsx(Text, {
1692
- style: styles$a.text,
1693
- children: scope.getItemLabel(item)
1694
- })]
1709
+ children: /*#__PURE__*/jsx(Child, {})
1695
1710
  })
1696
1711
  });
1697
1712
  };
@@ -1773,18 +1788,17 @@ function UIElement(props) {
1773
1788
  var ctx = useContext(CrudContext);
1774
1789
  var theme = Utils.nvl(props.theme, ctx == null ? void 0 : ctx.theme);
1775
1790
  var crud = Utils.nvl(props.crud, ctx == null ? void 0 : ctx.crud);
1776
- var _useState = useState(ScopeUtils.create(_extends({
1777
- crud: crud
1778
- }, props, {
1779
- theme: theme
1780
- }))),
1781
- scope = _useState[0];
1782
- var _useState2 = useState(0),
1783
- index = _useState2[0],
1784
- setIndex = _useState2[1];
1785
- var _useState3 = useState(null),
1786
- error = _useState3[0],
1787
- setError = _useState3[1];
1791
+ var scope = ScopeUtils.create(_extends({
1792
+ crud: crud
1793
+ }, props, {
1794
+ theme: theme
1795
+ }));
1796
+ var _useState = useState(0),
1797
+ index = _useState[0],
1798
+ setIndex = _useState[1];
1799
+ var _useState2 = useState(null),
1800
+ error = _useState2[0],
1801
+ setError = _useState2[1];
1788
1802
  scope.compile(props);
1789
1803
  crud = scope.crud;
1790
1804
  var options = scope.getOptions();