parsec-hooks 0.0.159 → 0.0.160
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.
@@ -114,12 +114,16 @@ function _default(getListFn, _ref) {
|
|
114
114
|
|
115
115
|
|
116
116
|
var refreshList = (0, _react.useCallback)(function (retainList) {
|
117
|
+
if (!needGet) {
|
118
|
+
return;
|
119
|
+
}
|
120
|
+
|
117
121
|
if (!retainList) {
|
118
122
|
setData(initData);
|
119
123
|
}
|
120
124
|
|
121
125
|
return handleGetList(retainList);
|
122
|
-
}, [handleGetList, initData, setData]);
|
126
|
+
}, [handleGetList, initData, needGet, setData]);
|
123
127
|
var visibleRef = (0, _stateRefHooks.default)(loadMoreVisible);
|
124
128
|
var isEndRef = (0, _stateRefHooks.default)(isEnd);
|
125
129
|
var getNext = (0, _react.useCallback)(function (callback) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "parsec-hooks",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.160",
|
4
4
|
"description": "秒差距前端常用的hooks工具",
|
5
5
|
"author": "mushan0x0",
|
6
6
|
"license": "MIT",
|
@@ -54,7 +54,7 @@
|
|
54
54
|
"@babel/helper-call-delegate": "^7.10.3",
|
55
55
|
"@babel/plugin-syntax-typescript": "^7.10.4",
|
56
56
|
"@types/qs": "^6.9.3",
|
57
|
-
"@types/react": "^
|
57
|
+
"@types/react": "^17.0.38",
|
58
58
|
"@types/react-dom": "^16.0.5",
|
59
59
|
"@types/vfile-message": "^2.0.0",
|
60
60
|
"dayjs": "^1.8.21",
|