Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Custom CellMeasurerCache
class CustomCellMeasurerCache extends CellMeasurerCache {
constructor (props) {
this._cellHeightEstimator = props.cellHeightEstimator
getHeight (rowIndex, columnIndex) {
const key = this._keyMapper(rowIndex, columnIndex)
return this._cellHeightCache.hasOwnProperty(key)
? Math.max(this._minHeight, this._cellHeightCache[key])
: this._cellHeightEstimator(rowIndex)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment