AutoRowSize
Members
inProgress
autoRowSize.inProgress : boolean
true if the size calculation is in progress.
measuredRows
autoRowSize.measuredRows : number
Number of already measured rows (we already know their sizes).
Methods
calculateAllRowsHeight
autoRowSize.calculateAllRowsHeight(colRange, [overwriteCache])
Calculate all rows heights. The calculated row will be cached in the AutoRowSize#heights property. To retrieve height for specified row use AutoRowSize#getRowHeight method.
| Param | Type | Default | Description |
|---|---|---|---|
| colRange | object number | Row index or an object with from and to properties which define row range. | |
| [overwriteCache] | boolean | false | optional If true the calculation will be processed regardless of whether the width exists in the cache. |
calculateRowsHeight
autoRowSize.calculateRowsHeight(rowRange, colRange, [overwriteCache])
Calculate a given rows height.
| Param | Type | Default | Description |
|---|---|---|---|
| rowRange | number object | Row index or an object with from and to indexes as a range. | |
| colRange | number object | Column index or an object with from and to indexes as a range. | |
| [overwriteCache] | boolean | false | optional If true the calculation will be processed regardless of whether the width exists in the cache. |
calculateVisibleRowsHeight
autoRowSize.calculateVisibleRowsHeight()
Calculates heights for visible rows in the viewport only.
clearCache
autoRowSize.clearCache([physicalRows])
Clears cache of calculated row heights. If you want to clear only selected rows pass an array with their indexes. Otherwise whole cache will be cleared.
| Param | Type | Description |
|---|---|---|
| [physicalRows] | Array<number> | optional List of physical row indexes to clear. |
clearCacheByRange
autoRowSize.clearCacheByRange(range)
Clears cache by range.
| Param | Type | Description |
|---|---|---|
| range | object number | Row index or an object with from and to properties which define row range. |
destroy
autoRowSize.destroy()
Destroys the plugin instance.
disablePlugin
autoRowSize.disablePlugin()
Disables the plugin functionality for this Handsontable instance.
enablePlugin
autoRowSize.enablePlugin()
Enables the plugin functionality for this Handsontable instance.
getColumnHeaderHeight
autoRowSize.getColumnHeaderHeight() ⇒ number | undefined
Get the calculated column header height.
getFirstVisibleRow
autoRowSize.getFirstVisibleRow() ⇒ number
Get the first visible row.
Returns: number - Returns row index, -1 if table is not rendered or if there are no rows to base the the calculations on.
getLastVisibleRow
autoRowSize.getLastVisibleRow() ⇒ number
Gets the last visible row.
Returns: number - Returns row index or -1 if table is not rendered.
getRowHeight
autoRowSize.getRowHeight(row, [defaultHeight]) ⇒ number
Get a row’s height, as measured in the DOM.
The height returned includes 1 px of the row’s bottom border.
Mind that this method is different from the
getRowHeight() method
of Handsontable’s Core.
| Param | Type | Description |
|---|---|---|
| row | number | A visual row index. |
| [defaultHeight] | number | optional If no height is found, defaultHeight is returned instead. |
Returns: number - The height of the specified row, in pixels.
getSyncCalculationLimit
autoRowSize.getSyncCalculationLimit() ⇒ number
Gets value which tells how many rows should be calculated synchronously (rest of the rows will be calculated
asynchronously). The limit is calculated based on syncLimit set to autoRowSize option (see Options#autoRowSize).
isEnabled
autoRowSize.isEnabled() ⇒ boolean
Checks if the plugin is enabled in the handsontable settings. This method is executed in Hooks#beforeInit
hook and if it returns true then the AutoRowSize#enablePlugin method is called.
isNeedRecalculate
autoRowSize.isNeedRecalculate() ⇒ boolean
Checks if all heights were calculated. If not then return true (need recalculate).
recalculateAllRowsHeight
autoRowSize.recalculateAllRowsHeight()
Recalculates all rows height (overwrite cache values).