u
This commit is contained in:
@@ -141,6 +141,7 @@ class FillSpace extends Component {
|
||||
if (this.raf) return;
|
||||
this.raf = requestAnimationFrame(() => {
|
||||
this.raf = null;
|
||||
console.log('vp')
|
||||
this._measure();
|
||||
});
|
||||
};
|
||||
@@ -152,10 +153,6 @@ class FillSpace extends Component {
|
||||
|
||||
this.observer = new ResizeObserver(() => this._onViewportChange());
|
||||
|
||||
// Never observe the spacer's own parent: resizing the spacer would resize the parent.
|
||||
// Skip content: every flip swaps all rows, which
|
||||
// would fire the observer -> _measure -> setState -> render in a loop.
|
||||
// Unit height is read lazily in _measure, so no observer is needed for it.
|
||||
const { aboveRef, belowRef, containerRef } = this.props;
|
||||
const aboveList = Array.isArray(aboveRef) ? aboveRef : [aboveRef];
|
||||
const belowList = Array.isArray(belowRef) ? belowRef : [belowRef];
|
||||
@@ -173,10 +170,6 @@ class FillSpace extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
measure = () => {
|
||||
this._measure();
|
||||
};
|
||||
|
||||
_measure() {
|
||||
if (!this.ref) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user