react-measured-grid

react-measured-grid API MeasuredGrid ScrollPosition PositionTracker demos repo

PositionTracker API

The PositionTracker class records measured sizes of items, and provides various estimates of sizes of items. With modest efficiency it also provides estimates of the total scrolling offset of an item within the entire grid.

The sizes that are tracked can be either the heights of rows or the widths of columns. An item is identified by its zero-based index.

Methods

The following are methods that are available for use:

PositionTracker(itemCount, unmeasuredSize, lowSize, maxBranches, maxLeafItems)

The rest of the methods are instance methods.

clearAllItems()

clearItemSize(index)

getContainingIndex(offset)

getItemCount()

getItemLowSize(index)

getItemMeasuredSize(index)

getItemSize(index)

getItemStats(index)

getLowSize()

getMaxBranches()

getMaxLeafItems()

getTotalSize()

getUnmeasuredSize()

setItemCount(itemCount)

setItemSize(index, size)

setLowSize(lowSize)

setUnmeasuredSize(index, size)