refactor IntersectionObserver to observe viewport in single-column mode (#12735)
parent
3b3bdc7293
commit
2a5da8c961
|
@ -210,10 +210,13 @@ export default class ScrollableList extends PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
attachIntersectionObserver () {
|
attachIntersectionObserver () {
|
||||||
this.intersectionObserverWrapper.connect({
|
let nodeOptions = {
|
||||||
root: this.node,
|
root: this.node,
|
||||||
rootMargin: '300% 0px',
|
rootMargin: '300% 0px',
|
||||||
});
|
};
|
||||||
|
|
||||||
|
this.intersectionObserverWrapper
|
||||||
|
.connect(this.props.bindToDocument ? {} : nodeOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
detachIntersectionObserver () {
|
detachIntersectionObserver () {
|
||||||
|
|
Reference in New Issue