Skip to content

Commit 7dd4de8

Browse files
author
Eric Vallee
committed
Edge cases improvements taken from react-virtualized
1 parent 74aa453 commit 7dd4de8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ export default class VirtualList extends PureComponent {
125125
const {onScroll} = this.props;
126126
const offset = this.getNodeOffset();
127127

128+
if(offset < 0 || this.state.offset == offset || e.target !== this.rootNode) {
129+
return;
130+
}
131+
128132
this.setState({offset});
129133

130134
if (typeof onScroll === 'function') {

0 commit comments

Comments
 (0)