react-crud-mobile 1.0.612 → 1.0.613

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.
@@ -657,6 +657,17 @@ var styles$6 = /*#__PURE__*/reactNative.StyleSheet.create({
657
657
  }
658
658
  });
659
659
 
660
+ function UIListRow(props) {
661
+ var scope = props.scope;
662
+ return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
663
+ children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
664
+ scope: scope,
665
+ crud: scope.crud,
666
+ children: props.children
667
+ })
668
+ });
669
+ }
670
+
660
671
  function UIList(props) {
661
672
  var _repeat$list;
662
673
  var scope = props.scope;
@@ -671,13 +682,6 @@ function UIList(props) {
671
682
  }) == null ? void 0 : _repeat$list[original.type];
672
683
  var add = reactCrudUtils.ComponentUtils.getDefine(props, 'add');
673
684
  var hideAddWhenEmpty = original.hideAddWhenEmpty;
674
- var onClick = function onClick(item) {
675
- scope.call('click', {
676
- value: item,
677
- item: item,
678
- edit: true
679
- });
680
- };
681
685
  var getStyle = function getStyle(key, extra) {
682
686
  return scope.getStyle(key, _extends({}, extra, styles[key]));
683
687
  };
@@ -725,7 +729,8 @@ function UIList(props) {
725
729
  };
726
730
  var RowItem = function RowItem(_ref) {
727
731
  var item = _ref.item,
728
- index = _ref.index;
732
+ index = _ref.index,
733
+ children = _ref.children;
729
734
  var name = "" + scope.key('row', index, '');
730
735
  var row = reactCrudUtils.ScopeUtils.create(_extends({}, original, {
731
736
  parent: scope,
@@ -742,13 +747,17 @@ function UIList(props) {
742
747
  }
743
748
  return css;
744
749
  };
750
+ var onClick = function onClick(item) {
751
+ row.call('click', {
752
+ value: item,
753
+ item: item,
754
+ edit: true
755
+ });
756
+ };
745
757
  if (!original.click) {
746
758
  return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
747
759
  style: getRowStyle(),
748
- children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
749
- scope: row,
750
- children: props.children
751
- })
760
+ children: children
752
761
  }, "k-" + index);
753
762
  }
754
763
  return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableHighlight, {
@@ -758,10 +767,7 @@ function UIList(props) {
758
767
  e.stopPropagation();
759
768
  onClick(item);
760
769
  },
761
- children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
762
- scope: row,
763
- children: props.children
764
- })
770
+ children: children
765
771
  }, "k-" + index);
766
772
  };
767
773
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
@@ -779,7 +785,13 @@ function UIList(props) {
779
785
  children: [/*#__PURE__*/jsxRuntime.jsx(Empty, {}), items.map(function (item, i) {
780
786
  return /*#__PURE__*/jsxRuntime.jsx(RowItem, {
781
787
  index: i,
782
- item: item
788
+ item: item,
789
+ children: /*#__PURE__*/jsxRuntime.jsx(UIListRow, {
790
+ scope: scope,
791
+ item: item,
792
+ index: i,
793
+ children: props.children
794
+ })
783
795
  });
784
796
  }), isShowAdd() && /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
785
797
  children: add
@@ -842,17 +854,6 @@ var stylesRepeat = /*#__PURE__*/reactNative.StyleSheet.create({
842
854
  }
843
855
  });
844
856
 
845
- function UIListRow(props) {
846
- var scope = props.scope;
847
- return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
848
- children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
849
- scope: scope,
850
- crud: scope.crud,
851
- children: props.children
852
- })
853
- });
854
- }
855
-
856
857
  function UIToggle(props) {
857
858
  var scope = props.scope;
858
859
  var options = reactCrudUtils.Utils.nvl(scope.getOptions(), []);