MCPcopy Create free account
hub / github.com/caseywebdev/react-list / getStartAndEnd

Method getStartAndEnd

src/react-list.js:230–239  ·  view source on GitHub ↗
(threshold = this.props.threshold)

Source from the content-addressed store, hash-verified

228 }
229
230 getStartAndEnd(threshold = this.props.threshold) {
231 const scroll = this.getScrollPosition();
232 const start = Math.max(0, scroll - threshold);
233 let end =
234 scroll + this.props.scrollParentViewportSizeGetter(this) + threshold;
235 if (this.hasDeterminateSize()) {
236 end = Math.min(end, this.getSpaceBefore(this.props.length));
237 }
238 return { start, end };
239 }
240
241 getItemSizeAndItemsPerRow() {
242 const { axis, useStaticSize } = this.props;

Callers 6

updateSimpleFrameMethod · 0.95
updateVariableFrameMethod · 0.95
updateUniformFrameMethod · 0.95
getVisibleRangeMethod · 0.95
react-list.jsFile · 0.80
index.jsFile · 0.80

Calls 3

getScrollPositionMethod · 0.95
hasDeterminateSizeMethod · 0.95
getSpaceBeforeMethod · 0.95

Tested by

no test coverage detected