Skip to content

ManualRowResize

Description

Initializes the plugin and applies CSS classes to the resize handle and guide elements.

Options

manualRowResize

Source code

manualRowResize.manualRowResize : boolean | Array<number>

The manualRowResize option configures the ManualRowResize plugin.

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

SettingDescription
trueEnable the ManualRowResize plugin
falseDisable the ManualRowResize plugin
An array- Enable the ManualRowResize plugin
- Set initial heights of individual rows

Read more:

This option can only be set at the grid level. It has no effect when set in the columns, cells, or cell options.

Default: undefined
Example

// enable the `ManualRowResize` plugin
manualRowResize: 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
manualRowResize: [40, 50, 60],

Members

PLUGIN_KEY

Source code

ManualRowResize.PLUGIN_KEY

Returns the plugin key used to identify this plugin in Handsontable settings.

PLUGIN_PRIORITY

Source code

ManualRowResize.PLUGIN_PRIORITY

Returns the priority order used to determine the order in which plugins are initialized.

Methods

destroy

Source code

manualRowResize.destroy()

Destroys the plugin instance.

disablePlugin

Source code

manualRowResize.disablePlugin()

Disables the plugin functionality for this Handsontable instance.

enablePlugin

Source code

manualRowResize.enablePlugin()

Enables the plugin functionality for this Handsontable instance.

getLastDesiredRowHeight

Source code

manualRowResize.getLastDesiredRowHeight() ⇒ number

Returns the last desired row height set manually with the resize handle.

Returns: number - The last desired row height.

isEnabled

Source code

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

loadManualRowHeights Deprecated

Source code

manualRowResize.loadManualRowHeights() ⇒ Array

Deprecated. The `PersistentState` plugin has been removed. This method is a no-op and will be removed in a future major release.

saveManualRowHeights Deprecated

Source code

manualRowResize.saveManualRowHeights()

Deprecated. The `PersistentState` plugin has been removed. This method is a no-op and will be removed in a future major release.

setManualSize

Source code

manualRowResize.setManualSize(row, height) ⇒ number

Sets the new height for the specified visual row index.

This method updates the plugin’s internal height map. Call render() after setManualSize() to repaint the grid. Values lower than the theme’s default row height are saved as the default row height.

Example

const resizePlugin = hot.getPlugin('manualRowResize');
resizePlugin.setManualSize(0, 40);
hot.render();
ParamTypeDescription
rownumberVisual row index.
heightnumberRow height (no less than the theme’s default row height).

Returns: number - Returns new height.

updatePlugin

Source code

manualRowResize.updatePlugin()

Updates the plugin’s state.

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