Open
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected]
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/react-infinite-scroll-component/dist/index.es.js b/node_modules/react-infinite-scroll-component/dist/index.es.js
index 628595f..d6182dc 100644
--- a/node_modules/react-infinite-scroll-component/dist/index.es.js
+++ b/node_modules/react-infinite-scroll-component/dist/index.es.js
@@ -287,6 +287,8 @@ var InfiniteScroll = /** @class */ (function (_super) {
: document.documentElement.scrollTop
? document.documentElement
: document.body;
+ // 修复当滚动到底部时,下拉刷新功能失效的问题
+ _this.lastScrollTop = target.scrollTop;
// return immediately if the action has already been triggered,
// prevents multiple triggers.
if (_this.actionTriggered)
@@ -300,7 +302,6 @@ var InfiniteScroll = /** @class */ (function (_super) {
_this.setState({ showLoader: true });
_this.props.next && _this.props.next();
}
- _this.lastScrollTop = target.scrollTop;
};
_this.state = {
showLoader: false,
diff --git a/node_modules/react-infinite-scroll-component/dist/index.js b/node_modules/react-infinite-scroll-component/dist/index.js
index a51bb4c..642d3dc 100644
--- a/node_modules/react-infinite-scroll-component/dist/index.js
+++ b/node_modules/react-infinite-scroll-component/dist/index.js
@@ -292,6 +292,8 @@ var InfiniteScroll = /** @class */ (function (_super) {
: document.documentElement.scrollTop
? document.documentElement
: document.body;
+ // 修复当滚动到底部时,下拉刷新功能失效的问题
+ _this.lastScrollTop = target.scrollTop;
// return immediately if the action has already been triggered,
// prevents multiple triggers.
if (_this.actionTriggered)
@@ -305,7 +307,6 @@ var InfiniteScroll = /** @class */ (function (_super) {
_this.setState({ showLoader: true });
_this.props.next && _this.props.next();
}
- _this.lastScrollTop = target.scrollTop;
};
_this.state = {
showLoader: false,
This issue body was partially generated by patch-package.
Metadata
Metadata
Assignees
Labels
No labels