react-crud-mobile 1.0.557 → 1.0.559
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 +25 -8
- 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 +25 -8
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/elements/UIElement.tsx +2 -3
- package/src/elements/core/UIList.tsx +25 -10
|
@@ -748,6 +748,26 @@ function UIList(props) {
|
|
|
748
748
|
children: empty
|
|
749
749
|
});
|
|
750
750
|
};
|
|
751
|
+
var RowItem = function RowItem(_ref) {
|
|
752
|
+
var item = _ref.item,
|
|
753
|
+
index = _ref.index,
|
|
754
|
+
children = _ref.children;
|
|
755
|
+
if (!original.click) {
|
|
756
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
757
|
+
style: getRowStyle(),
|
|
758
|
+
children: children
|
|
759
|
+
}, "k-" + index);
|
|
760
|
+
}
|
|
761
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableHighlight, {
|
|
762
|
+
style: getRowStyle(),
|
|
763
|
+
underlayColor: 'transparent',
|
|
764
|
+
onPress: function onPress(e) {
|
|
765
|
+
e.stopPropagation();
|
|
766
|
+
onClick(item);
|
|
767
|
+
},
|
|
768
|
+
children: children
|
|
769
|
+
}, "k-" + index);
|
|
770
|
+
};
|
|
751
771
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
752
772
|
children: [original.search !== false && /*#__PURE__*/jsxRuntime.jsx(UI.Text, {
|
|
753
773
|
placeholder: "Pesquisar...",
|
|
@@ -761,19 +781,16 @@ function UIList(props) {
|
|
|
761
781
|
}), /*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
|
|
762
782
|
style: getContainerStyle(),
|
|
763
783
|
children: [/*#__PURE__*/jsxRuntime.jsx(Empty, {}), items.map(function (item, i) {
|
|
764
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
onPress: function onPress(e) {
|
|
768
|
-
onClick(item);
|
|
769
|
-
},
|
|
784
|
+
return /*#__PURE__*/jsxRuntime.jsx(RowItem, {
|
|
785
|
+
index: i,
|
|
786
|
+
item: item,
|
|
770
787
|
children: /*#__PURE__*/jsxRuntime.jsx(UIListRow, {
|
|
771
788
|
scope: scope,
|
|
772
789
|
item: item,
|
|
773
790
|
index: i,
|
|
774
791
|
children: props.children
|
|
775
792
|
})
|
|
776
|
-
}
|
|
793
|
+
});
|
|
777
794
|
}), isShowAdd() && /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
778
795
|
children: add
|
|
779
796
|
})]
|
|
@@ -1206,13 +1223,13 @@ function UIElement(props) {
|
|
|
1206
1223
|
theme: theme
|
|
1207
1224
|
}))),
|
|
1208
1225
|
scope = _useState[0];
|
|
1209
|
-
crud = scope.crud;
|
|
1210
1226
|
var _useState2 = React.useState(0),
|
|
1211
1227
|
index = _useState2[0],
|
|
1212
1228
|
setIndex = _useState2[1];
|
|
1213
1229
|
var _useState3 = React.useState(null),
|
|
1214
1230
|
error = _useState3[0],
|
|
1215
1231
|
setError = _useState3[1];
|
|
1232
|
+
crud = scope.crud;
|
|
1216
1233
|
var options = scope.getOptions();
|
|
1217
1234
|
var original = scope.original;
|
|
1218
1235
|
var ref = React.useRef(null);
|