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>

The manualRowResize option configures the ManualRowResize plugin.

You can set the manualRowResize option to one of the following:

Setting Description
true Enable the ManualRowResize plugin
false Disable the ManualRowResize plugin
An array - Enable the ManualRowResize plugin
- Set initial heights of individual rows

Read more:

Default: undefined Example

// enable the `ManualRowResize` plugin
manualColumnResize: true,

// enable the `ManualRowResize` plugin
// set the initial height of row 0 to 40 pixels
// set the initial height of row 1 to 50 pixels
// set the initial height of row 2 to 60 pixels
manualColumnResize: [40, 50, 60],

# Methods

# destroy

Source code (opens new window)

manualRowResize.destroy()

Destroys the plugin instance.

# disablePlugin

Source code (opens new window)

manualRowResize.disablePlugin()

Disables the plugin functionality for this Handsontable instance.

# enablePlugin

Source code (opens new window)

manualRowResize.enablePlugin()

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)

manualRowResize.saveManualRowHeights()

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)

manualRowResize.updatePlugin()

Updates the plugin's state.

This method is executed when updateSettings() is invoked with any of the following configuration options:

Last Updated: Apr 19, 2024