[fix] VirtualizedList passive event listener warning

Close #2601
This commit is contained in:
Tienifr
2023-10-25 16:50:55 +07:00
committed by Nicolas Gallagher
parent 8cf720f0e5
commit a0cd8ffba4

View File

@@ -746,7 +746,8 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
setupWebWheelHandler() {
if (this._scrollRef && this._scrollRef.getScrollableNode) {
this._scrollRef.getScrollableNode().addEventListener('wheel',
this.invertedWheelEventHandler
this.invertedWheelEventHandler,
{ passive: true },
);
} else {
setTimeout(() => this.setupWebWheelHandler(), 50);