react-crud-mobile 1.0.621 → 1.0.623

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.
@@ -692,12 +692,6 @@ function UIListRow(props) {
692
692
  data: item
693
693
  }))),
694
694
  row = _useState[0];
695
- var _useState2 = React.useState(0),
696
- updateIndex = _useState2[0],
697
- setUpdateIndex = _useState2[1];
698
- row.update = function () {
699
- setUpdateIndex(++updateIndex);
700
- };
701
695
  var getRowStyle = function getRowStyle() {
702
696
  var css = row.getStyle('row', _extends({}, styles.row));
703
697
  if (cols > 0) {
@@ -712,29 +706,39 @@ function UIListRow(props) {
712
706
  edit: true
713
707
  });
714
708
  };
715
- if (!original.click) {
716
- return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
709
+ var ListItem = function ListItem() {
710
+ var _useState2 = React.useState(0),
711
+ updateIndex = _useState2[0],
712
+ setUpdateIndex = _useState2[1];
713
+ row.update = function () {
714
+ scope.updateIndex = scope.updateIndex + 1;
715
+ setUpdateIndex(++updateIndex);
716
+ };
717
+ if (!original.click) {
718
+ return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
719
+ style: getRowStyle(),
720
+ children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
721
+ scope: row,
722
+ crud: row.crud,
723
+ children: props.children
724
+ })
725
+ }, "k-" + index);
726
+ }
727
+ return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableHighlight, {
717
728
  style: getRowStyle(),
729
+ underlayColor: 'transparent',
730
+ onPress: function onPress(e) {
731
+ e.stopPropagation();
732
+ onClick(item);
733
+ },
718
734
  children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
719
735
  scope: row,
720
736
  crud: row.crud,
721
737
  children: props.children
722
738
  })
723
739
  }, "k-" + index);
724
- }
725
- return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableHighlight, {
726
- style: getRowStyle(),
727
- underlayColor: 'transparent',
728
- onPress: function onPress(e) {
729
- e.stopPropagation();
730
- onClick(item);
731
- },
732
- children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
733
- scope: row,
734
- crud: row.crud,
735
- children: props.children
736
- })
737
- }, "k-" + index);
740
+ };
741
+ return /*#__PURE__*/jsxRuntime.jsx(ListItem, {});
738
742
  }
739
743
  var stylesList = /*#__PURE__*/reactNative.StyleSheet.create({
740
744
  row: {