react-crud-mobile 1.0.630 → 1.0.632
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 +11 -2
- 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 +11 -2
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIList.tsx +12 -3
- package/src/elements/core/UIListRow.tsx +1 -1
|
@@ -696,7 +696,8 @@ function UIListRow(props) {
|
|
|
696
696
|
row.call('click', {
|
|
697
697
|
value: item,
|
|
698
698
|
item: item,
|
|
699
|
-
edit: true
|
|
699
|
+
edit: true,
|
|
700
|
+
index: index
|
|
700
701
|
});
|
|
701
702
|
};
|
|
702
703
|
var ListItem = function ListItem() {
|
|
@@ -771,6 +772,13 @@ function UIList(props) {
|
|
|
771
772
|
}) == null ? void 0 : _repeat$list[original.type];
|
|
772
773
|
var add = reactCrudUtils.ComponentUtils.getDefine(props, 'add');
|
|
773
774
|
var hideAddWhenEmpty = original.hideAddWhenEmpty;
|
|
775
|
+
var _useState = React.useState(0),
|
|
776
|
+
index = _useState[0],
|
|
777
|
+
setIndex = _useState[1];
|
|
778
|
+
scope.update = function () {
|
|
779
|
+
scope.updateIndex = ++index;
|
|
780
|
+
setIndex(index);
|
|
781
|
+
};
|
|
774
782
|
var getStyle = function getStyle(key, extra) {
|
|
775
783
|
return scope.getStyle(key, _extends({}, extra, styles[key]));
|
|
776
784
|
};
|
|
@@ -816,6 +824,7 @@ function UIList(props) {
|
|
|
816
824
|
children: empty
|
|
817
825
|
});
|
|
818
826
|
};
|
|
827
|
+
var keyData = scope.key('data');
|
|
819
828
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
820
829
|
children: [original.search !== false && /*#__PURE__*/jsxRuntime.jsx(UI.Text, {
|
|
821
830
|
placeholder: "Pesquisar...",
|
|
@@ -838,7 +847,7 @@ function UIList(props) {
|
|
|
838
847
|
}), isShowAdd() && /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
839
848
|
children: add
|
|
840
849
|
})]
|
|
841
|
-
})]
|
|
850
|
+
}, keyData)]
|
|
842
851
|
});
|
|
843
852
|
}
|
|
844
853
|
var stylesList$1 = /*#__PURE__*/reactNative.StyleSheet.create({
|