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.
Methods
-
clearManualSize(column)
-
Clears the cache for the specified column index.
Parameters:
Name Type Description column
Number Visual column index.
-
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 returnstrue
than theManualColumnResize#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:
- Hooks#event:persistentStateLoad
- Hooks#event:manualColumnWidths
Returns: {Array}
-
saveManualColumnWidths()
-
Saves the current sizes using the persistentState plugin (the
Options#persistentState
option has to be enabled). -
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.