ManualColumnResize

This plugin allows to change columns width. To make columns width persistent the Options#persistentState
plugin should be enabled.

The plugin creates additional components to make resizing possibly using user interface:

  • handle - the draggable element that sets the desired width of the column.
  • guide - the helper guide that shows the desired width as a vertical guide.

Classes

ManualColumnResize

Methods

clearManualSize(column)

Clears the cache for the specified column index.

Parameters:
Name Type Description
column number

Visual column index.

destroy()

Destroys the plugin instance.

disablePlugin()

Disables the plugin functionality for this Handsontable instance.

enablePlugin()

Enables the plugin functionality for this Handsontable instance.

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 than the ManualColumnResize#enablePlugin method is called.

Returns: {boolean}

loadManualColumnWidths(){Array}

Loads the previously saved sizes using the persistentState plugin (the Options#persistentState option has to be enabled).

Fires:
Returns: {Array}

saveManualColumnWidths()

Saves the current sizes using the persistentState plugin (the Options#persistentState option has to be enabled).

Fires:

setManualSize(column, width){number}

Sets the new width for specified column index.

Parameters:
Name Type Description
column number

Visual column index.

width number

Column width (no less than 20px).

Returns: {number} Returns new width.

updatePlugin()

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

Class: ManualColumnResize