@hzab/list-render 1.10.14 → 1.10.16
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/CHANGELOG.md +8 -0
- package/package.json +3 -2
- package/src/list-render.jsx +2 -3
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hzab/list-render",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.16",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "webpack serve -c ./config/webpack.config.js --env local",
|
|
8
8
|
"build": "webpack -c ./config/webpack.config.js --env production",
|
|
9
|
-
"
|
|
9
|
+
"release:alpha": "npm version prerelease --preid=alpha && npm publish --tag alpha",
|
|
10
|
+
"release:beta": "npm version prerelease --preid=beta && npm publish --tag beta",
|
|
10
11
|
"publish-patch": "npm version patch && npm publish --access public",
|
|
11
12
|
"publish-minor": "npm version minor && npm publish --access public",
|
|
12
13
|
"publish-major": "npm version major && npm publish --access public"
|
package/src/list-render.jsx
CHANGED
|
@@ -149,8 +149,7 @@ const ListRender = forwardRef(function (props, parentRef) {
|
|
|
149
149
|
setListLoading(true);
|
|
150
150
|
const { list } = props;
|
|
151
151
|
const { pageNum = 1, pageSize = pageSizeOptions[0] } = paginationQueryRef.current || {};
|
|
152
|
-
|
|
153
|
-
setList(list.slice(pageSize * (pageNum - 1), pageNum * pageSize));
|
|
152
|
+
setList(props?.hasPagination === false ? list : list.slice(pageSize * (pageNum - 1), pageNum * pageSize));
|
|
154
153
|
setTotal(list.length);
|
|
155
154
|
props.onGetListEnd && props.onGetListEnd({ list, pagination: { pageNum, pageSize } });
|
|
156
155
|
setListLoading(false);
|
|
@@ -385,7 +384,7 @@ const ListRender = forwardRef(function (props, parentRef) {
|
|
|
385
384
|
async function onEditSubmit(data, opt) {
|
|
386
385
|
let _data = data;
|
|
387
386
|
if (isPatchUpdate) {
|
|
388
|
-
if (model?.patchMap === "function") {
|
|
387
|
+
if (typeof model?.patchMap === "function") {
|
|
389
388
|
_data = model.patchMap(data, opt);
|
|
390
389
|
}
|
|
391
390
|
} else if (typeof model?.updateMap === "function") {
|