ManualColumnFreeze
See the Column freezing guide for examples and configuration details.
Options
manualColumnFreeze
Can be set at: grid
manualColumnFreeze.manualColumnFreeze : boolean | object
The manualColumnFreeze option configures the ManualColumnFreeze plugin.
You can set the manualColumnFreeze option to one of the following:
| Setting | Description |
|---|---|
true | Enable the ManualColumnFreeze plugin |
false | Disable the ManualColumnFreeze plugin |
| An object | Enable the ManualColumnFreeze plugin and configure it |
The object form accepts the following property:
| Property | Type | Default | Description |
|---|---|---|---|
restoreColumnPosition | boolean | false | When true, an unfrozen column goes back among the scrollable columns by its data source order: right after the last scrollable column that comes before it in the data source. When false, it stays right after the frozen columns. Available since 19.0.0. |
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 `ManualColumnFreeze` pluginmanualColumnFreeze: true,
// enable the `ManualColumnFreeze` plugin, and move an unfrozen column back by its data source ordermanualColumnFreeze: { restoreColumnPosition: true,},Members
DEFAULT_SETTINGS
ManualColumnFreeze.DEFAULT_SETTINGS
Returns the default settings of the plugin, used when manualColumnFreeze is set to true.
LICENSE
ManualColumnFreeze.LICENSE
Returns the license token of the plugin, its display name, where it is checked, and the tokens it requires.
PLUGIN_KEY
ManualColumnFreeze.PLUGIN_KEY
Returns the plugin key used to identify this plugin in Handsontable settings.
PLUGIN_PRIORITY
ManualColumnFreeze.PLUGIN_PRIORITY
Returns the priority order used to determine the order in which plugins are initialized.
SETTINGS_VALIDATORS
ManualColumnFreeze.SETTINGS_VALIDATORS
Returns the validators of the object form of the plugin’s settings.
Methods
enablePlugin
manualColumnFreeze.enablePlugin()
Enables the plugin functionality for this Handsontable instance.
freezeColumn
manualColumnFreeze.freezeColumn(column)
Freezes the specified column (adds it to fixed columns).
freezeColumn() doesn’t re-render the table,
so you need to call the render() method afterward.
The method does nothing when the column is already frozen, when it belongs to the fixedColumnsEnd band, or,
with the limitFixedToViewport option on, when one more frozen column would not fit the grid. The
afterColumnFreeze hook then reports that the freeze was not performed.
| Param | Type | Description |
|---|---|---|
| column | number | Visual column index. |
isEnabled
manualColumnFreeze.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 ManualColumnFreeze#enablePlugin method is called.
unfreezeColumn
manualColumnFreeze.unfreezeColumn(column)
Unfreezes the given column (removes it from fixed columns). The column is placed right after the frozen
columns, or, with the restoreColumnPosition setting, back among the scrollable columns in data order.
The method does nothing when the column is not frozen, or when unfreezing it would hand a column to the
fixedColumnsEnd band. With the limitFixedToViewport option on, a column that the grid draws as scrolling
counts as not frozen, and the new count is the drawn count minus one. The afterColumnUnfreeze hook then
reports whether the unfreeze was performed.
| Param | Type | Description |
|---|---|---|
| column | number | Visual column index. |
updatePlugin
manualColumnFreeze.updatePlugin()
Updates the plugin’s state.
This method is executed when updateSettings() is invoked with any of the following configuration options: