BindRowsWithHeaders
Plugin: BindRowsWithHeaders
Description
Plugin allows binding the table rows with their headers.
If the plugin is enabled, the table row headers will “stick” to the rows, when they are hidden/moved. Basically, if at the initialization row 0 has a header titled “A”, it will have it no matter what you do with the table.
Example
<HotTable data={getData()} // enable plugin bindRowsWithHeaders={true}/>Options
bindRowsWithHeaders
bindRowsWithHeaders.bindRowsWithHeaders : boolean | string
The bindRowsWithHeaders option configures the BindRowsWithHeaders plugin.
When enabled, each row stays permanently linked to its row header label, regardless of row sorting or row moving. Normally, row headers display the visual row index and update as rows are reordered; with this plugin enabled, the header travels with the data row it was originally assigned to.
You can set the bindRowsWithHeaders option to one of the following:
| Setting | Description |
|---|---|
false | Disable the the BindRowsWithHeaders plugin |
true | Enable the the BindRowsWithHeaders plugin |
This option can only be set at the grid level.
It has no effect when set in the columns, cells, or cell options.
Read more:
Default: undefined
Example
// enable the `BindRowsWithHeaders` pluginbindRowsWithHeaders: trueMethods
destroy
bindRowsWithHeaders.destroy()
Destroys the plugin instance.
disablePlugin
bindRowsWithHeaders.disablePlugin()
Disables the plugin functionality for this Handsontable instance.
enablePlugin
bindRowsWithHeaders.enablePlugin()
Enables the plugin functionality for this Handsontable instance.
isEnabled
bindRowsWithHeaders.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 BindRowsWithHeaders#enablePlugin method is called.