Skip to content

Instantly share code, notes, and snippets.

Created January 16, 2018 23:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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