This page covers a next version of Handsontable, and is not published yet.

This page covers a non-latest version of Handsontable.

# ManualRowResize

# Description

This plugin allows to change rows height. To make rows height 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 height of the row.
  • guide - the helper guide that shows the desired height as a horizontal guide.

# Options

# manualRowResize

Source code (opens new window)

manualRowResize.manualRowResize : boolean | Array<number>

Turns on Manual row resize, if set to a boolean or define initial row resized heights (as an array of heights).

Default: undefined Example

// as a boolean to enable row resize
manualRowResize: true,

// as an array to set initial heights
// (row at 0 index has 40px and row at 1 index has 50px)
manualRowResize: [40, 50],

# Methods

# destroy

Source code (opens new window)


Destroys the plugin instance.

# disablePlugin

Source code (opens new window)


Disables the plugin functionality for this Handsontable instance.

# enablePlugin

Source code (opens new window)


Enables the plugin functionality for this Handsontable instance.

# isEnabled

Source code (opens new window)

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

# loadManualRowHeights

Source code (opens new window)

manualRowResize.loadManualRowHeights() ⇒ Array

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

Emits: Hooks#event:persistentStateLoad

# saveManualRowHeights

Source code (opens new window)


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

Emits: Hooks#event:persistentStateSave

# setManualSize

Source code (opens new window)

manualRowResize.setManualSize(row, height) ⇒ number

Sets the new height for specified row index.

Param Type Description
row number Visual row index.
height number Row height.

Returns: number - Returns new height.

# updatePlugin

Source code (opens new window)


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

Last Updated: Apr 12, 2024