(startIndex, stopIndex)
| 123 | } |
| 124 | |
| 125 | _doStuff(startIndex, stopIndex) { |
| 126 | const {isRowLoaded, minimumBatchSize, rowCount, threshold} = this.props; |
| 127 | |
| 128 | const unloadedRanges = scanForUnloadedRanges({ |
| 129 | isRowLoaded, |
| 130 | minimumBatchSize, |
| 131 | rowCount, |
| 132 | startIndex: Math.max(0, startIndex - threshold), |
| 133 | stopIndex: Math.min(rowCount - 1, stopIndex + threshold), |
| 134 | }); |
| 135 | |
| 136 | // For memoize comparison |
| 137 | const squashedUnloadedRanges = [].concat( |
| 138 | ...unloadedRanges.map(({startIndex, stopIndex}) => [ |
| 139 | startIndex, |
| 140 | stopIndex, |
| 141 | ]), |
| 142 | ); |
| 143 | |
| 144 | this._loadMoreRowsMemoizer({ |
| 145 | callback: () => { |
| 146 | this._loadUnloadedRanges(unloadedRanges); |
| 147 | }, |
| 148 | indices: {squashedUnloadedRanges}, |
| 149 | }); |
| 150 | } |
| 151 | |
| 152 | _registerChild(registeredChild) { |
| 153 | this._registeredChild = registeredChild; |
no test coverage detected