Skip to content

Commit 548ba5a

Browse files
author
Clauderic Demers
committed
Update passive event listener syntax
1 parent e75f225 commit 548ba5a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ export default class VirtualList extends React.PureComponent<Props, State> {
141141

142142
componentDidMount() {
143143
const {scrollOffset, scrollToIndex} = this.props;
144-
this.rootNode.addEventListener('scroll', this.handleScroll, true);
144+
this.rootNode.addEventListener('scroll', this.handleScroll, {
145+
passive: true,
146+
});
145147

146148
if (scrollOffset != null) {
147149
this.scrollTo(scrollOffset);

0 commit comments

Comments
 (0)