()
| 216 | } |
| 217 | |
| 218 | componentDidMount() { |
| 219 | const {cellLayoutManager, scrollLeft, scrollToCell, scrollTop} = this.props; |
| 220 | |
| 221 | // If this component was first rendered server-side, scrollbar size will be undefined. |
| 222 | // In that event we need to remeasure. |
| 223 | if (!this._scrollbarSizeMeasured) { |
| 224 | this._scrollbarSize = getScrollbarSize(); |
| 225 | this._scrollbarSizeMeasured = true; |
| 226 | this.setState({}); |
| 227 | } |
| 228 | |
| 229 | if (scrollToCell >= 0) { |
| 230 | this._updateScrollPositionForScrollToCell(); |
| 231 | } else if (scrollLeft >= 0 || scrollTop >= 0) { |
| 232 | this._setScrollPosition({scrollLeft, scrollTop}); |
| 233 | } |
| 234 | |
| 235 | // Update onSectionRendered callback. |
| 236 | this._invokeOnSectionRenderedHelper(); |
| 237 | |
| 238 | const { |
| 239 | height: totalHeight, |
| 240 | width: totalWidth, |
| 241 | } = cellLayoutManager.getTotalSize(); |
| 242 | |
| 243 | // Initialize onScroll callback. |
| 244 | this._invokeOnScrollMemoizer({ |
| 245 | scrollLeft: scrollLeft || 0, |
| 246 | scrollTop: scrollTop || 0, |
| 247 | totalHeight, |
| 248 | totalWidth, |
| 249 | }); |
| 250 | } |
| 251 | |
| 252 | componentDidUpdate(prevProps, prevState) { |
| 253 | const {height, scrollToAlignment, scrollToCell, width} = this.props; |
nothing calls this directly
no test coverage detected
searching dependent graphs…