Skip to content

Members

inProgress

Source code

autoColumnSize.inProgress : boolean

true if the size calculation is in progress.

measuredColumns

Source code

autoColumnSize.measuredColumns : number

Number of already measured columns (we already know their sizes).

Methods

calculateAllColumnsWidth

Source code

autoColumnSize.calculateAllColumnsWidth(rowRange, [overwriteCache])

Calculates all columns width. The calculated column will be cached in the AutoColumnSize#widths property. To retrieve width for specified column use AutoColumnSize#getColumnWidth method.

ParamTypeDefaultDescription
rowRangeobject
number
Row index or an object with from and to properties which define row range.
[overwriteCache]booleanfalseoptional If true the calculation will be processed regardless of whether the width exists in the cache.

calculateColumnsWidth

Source code

autoColumnSize.calculateColumnsWidth(colRange, rowRange, [overwriteCache])

Calculates a columns width.

ParamTypeDefaultDescription
colRangenumber
object
Visual column index or an object with from and to visual indexes as a range.
rowRangenumber
object
Visual row index or an object with from and to visual indexes as a range.
[overwriteCache]booleanfalseoptional If true the calculation will be processed regardless of whether the width exists in the cache.

calculateVisibleColumnsWidth

Source code

autoColumnSize.calculateVisibleColumnsWidth()

Calculates widths for visible columns in the viewport only.

clearCache

Source code

autoColumnSize.clearCache([physicalColumns])

Clears cache of calculated column widths. If you want to clear only selected columns pass an array with their indexes. Otherwise whole cache will be cleared.

ParamTypeDescription
[physicalColumns]Array<number>optional List of physical column indexes to clear.

destroy

Source code

autoColumnSize.destroy()

Destroys the plugin instance.

disablePlugin

Source code

autoColumnSize.disablePlugin()

Disables the plugin functionality for this Handsontable instance.

enablePlugin

Source code

autoColumnSize.enablePlugin()

Enables the plugin functionality for this Handsontable instance.

getColumnWidth

Source code

autoColumnSize.getColumnWidth(column, [defaultWidth], [keepMinimum]) ⇒ number

Gets the calculated column width.

ParamTypeDefaultDescription
columnnumberVisual column index.
[defaultWidth]numberoptional Default column width. It will be picked up if no calculated width found.
[keepMinimum]booleantrueoptional If true then returned value won’t be smaller then 50 (default column width).

getFirstVisibleColumn

Source code

autoColumnSize.getFirstVisibleColumn() ⇒ number

Gets the first visible column.

Returns: number - Returns visual column index, -1 if table is not rendered or if there are no columns to base the the calculations on.

getLastVisibleColumn

Source code

autoColumnSize.getLastVisibleColumn() ⇒ number

Gets the last visible column.

Returns: number - Returns visual column index or -1 if table is not rendered.

getSyncCalculationLimit

Source code

autoColumnSize.getSyncCalculationLimit() ⇒ number

Gets value which tells how many columns should be calculated synchronously (rest of the columns will be calculated asynchronously). The limit is calculated based on syncLimit set to autoColumnSize option (see Options#autoColumnSize).

isEnabled

Source code

autoColumnSize.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 #enablePlugin method is called.

isNeedRecalculate

Source code

autoColumnSize.isNeedRecalculate() ⇒ boolean

Checks if all widths were calculated. If not then return true (need recalculate).

recalculateAllColumnsWidth

Source code

autoColumnSize.recalculateAllColumnsWidth()

Recalculates all columns width (overwrite cache values).

updatePlugin

Source code

autoColumnSize.updatePlugin()

Updates the plugin’s state. This method is executed when Core#updateSettings is invoked.