(cb)
| 375 | } |
| 376 | |
| 377 | updateUniformFrame(cb) { |
| 378 | const { itemSize, itemsPerRow } = this.getItemSizeAndItemsPerRow(); |
| 379 | |
| 380 | if (!itemSize || !itemsPerRow) return cb(); |
| 381 | |
| 382 | const { start, end } = this.getStartAndEnd(); |
| 383 | |
| 384 | const { from, size } = constrain(this.props, { |
| 385 | from: Math.floor(start / itemSize) * itemsPerRow, |
| 386 | size: (Math.ceil((end - start) / itemSize) + 1) * itemsPerRow, |
| 387 | itemsPerRow |
| 388 | }); |
| 389 | |
| 390 | return this.maybeSetState({ itemsPerRow, from, itemSize, size }, cb); |
| 391 | } |
| 392 | |
| 393 | getSpaceBefore(index, cache = {}) { |
| 394 | if (cache[index] != null) return cache[index]; |
no test coverage detected