react-crud-mobile 1.0.620 → 1.0.622
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.
- package/dist/react-crud-mobile.cjs.development.js +34 -24
- package/dist/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js +34 -24
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIListRow.tsx +41 -28
|
@@ -683,14 +683,15 @@ function UIListRow(props) {
|
|
|
683
683
|
list: stylesList
|
|
684
684
|
}) == null ? void 0 : _repeat$list[original.type];
|
|
685
685
|
var name = "" + scope.key('row', index, '');
|
|
686
|
-
var
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
686
|
+
var _useState = React.useState(reactCrudUtils.ScopeUtils.create(_extends({}, original, {
|
|
687
|
+
parent: scope,
|
|
688
|
+
name: name,
|
|
689
|
+
crud: scope.crud,
|
|
690
|
+
index: index,
|
|
691
|
+
type: 'row',
|
|
692
|
+
data: item
|
|
693
|
+
}))),
|
|
694
|
+
row = _useState[0];
|
|
694
695
|
var getRowStyle = function getRowStyle() {
|
|
695
696
|
var css = row.getStyle('row', _extends({}, styles.row));
|
|
696
697
|
if (cols > 0) {
|
|
@@ -705,29 +706,38 @@ function UIListRow(props) {
|
|
|
705
706
|
edit: true
|
|
706
707
|
});
|
|
707
708
|
};
|
|
708
|
-
|
|
709
|
-
|
|
709
|
+
var ListItem = function ListItem() {
|
|
710
|
+
var _useState2 = React.useState(0),
|
|
711
|
+
updateIndex = _useState2[0],
|
|
712
|
+
setUpdateIndex = _useState2[1];
|
|
713
|
+
row.update = function () {
|
|
714
|
+
setUpdateIndex(++updateIndex);
|
|
715
|
+
};
|
|
716
|
+
if (!original.click) {
|
|
717
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
718
|
+
style: getRowStyle(),
|
|
719
|
+
children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
|
|
720
|
+
scope: row,
|
|
721
|
+
crud: row.crud,
|
|
722
|
+
children: props.children
|
|
723
|
+
})
|
|
724
|
+
}, "k-" + index);
|
|
725
|
+
}
|
|
726
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableHighlight, {
|
|
710
727
|
style: getRowStyle(),
|
|
728
|
+
underlayColor: 'transparent',
|
|
729
|
+
onPress: function onPress(e) {
|
|
730
|
+
e.stopPropagation();
|
|
731
|
+
onClick(item);
|
|
732
|
+
},
|
|
711
733
|
children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
|
|
712
734
|
scope: row,
|
|
713
735
|
crud: row.crud,
|
|
714
736
|
children: props.children
|
|
715
737
|
})
|
|
716
738
|
}, "k-" + index);
|
|
717
|
-
}
|
|
718
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
719
|
-
style: getRowStyle(),
|
|
720
|
-
underlayColor: 'transparent',
|
|
721
|
-
onPress: function onPress(e) {
|
|
722
|
-
e.stopPropagation();
|
|
723
|
-
onClick(item);
|
|
724
|
-
},
|
|
725
|
-
children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
|
|
726
|
-
scope: row,
|
|
727
|
-
crud: row.crud,
|
|
728
|
-
children: props.children
|
|
729
|
-
})
|
|
730
|
-
}, "k-" + index);
|
|
739
|
+
};
|
|
740
|
+
return /*#__PURE__*/jsxRuntime.jsx(ListItem, {});
|
|
731
741
|
}
|
|
732
742
|
var stylesList = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
733
743
|
row: {
|