Skip to content

Commit bd8a56a

Browse files
Updated build
1 parent 43d7513 commit bd8a56a

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

dist/InfiniteScroll.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ var InfiniteScroll = (function(_Component) {
117117
key: 'componentWillUnmount',
118118
value: function componentWillUnmount() {
119119
this.detachScrollListener();
120+
this.detachMousewheelListener();
120121
},
121122

122123
// Set a defaut loader for all your `InfiniteScroll` components
@@ -128,8 +129,8 @@ var InfiniteScroll = (function(_Component) {
128129
},
129130
},
130131
{
131-
key: 'detachScrollListener',
132-
value: function detachScrollListener() {
132+
key: 'detachMousewheelListener',
133+
value: function detachMousewheelListener() {
133134
var scrollEl = window;
134135
if (this.props.useWindow === false) {
135136
scrollEl = this.scrollComponent.parentNode;
@@ -140,6 +141,16 @@ var InfiniteScroll = (function(_Component) {
140141
this.mousewheelListener,
141142
this.props.useCapture,
142143
);
144+
},
145+
},
146+
{
147+
key: 'detachScrollListener',
148+
value: function detachScrollListener() {
149+
var scrollEl = window;
150+
if (this.props.useWindow === false) {
151+
scrollEl = this.scrollComponent.parentNode;
152+
}
153+
143154
scrollEl.removeEventListener(
144155
'scroll',
145156
this.scrollListener,

0 commit comments

Comments
 (0)