# 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

const container = document.getElementById('example');
const hot = new Handsontable(container, {
  data: getData(),
  // enable plugin
  bindRowsWithHeaders: true
});

# Options

# bindRowsWithHeaders

Source code (opens new window)

bindRowsWithHeaders.bindRowsWithHeaders : boolean | string

Enables the functionality of the BindRowsWithHeaders plugin which 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.

Default: undefined
Example

// keep row data and row headers in sync
bindRowsWithHeaders: true

# Methods

# destroy

Source code (opens new window)

bindRowsWithHeaders.destroy()

Destroys the plugin instance.

# disablePlugin

Source code (opens new window)

bindRowsWithHeaders.disablePlugin()

Disables the plugin functionality for this Handsontable instance.

# enablePlugin

Source code (opens new window)

bindRowsWithHeaders.enablePlugin()

Enables the plugin functionality for this Handsontable instance.

# isEnabled

Source code (opens new window)

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 than the BindRowsWithHeaders#enablePlugin method is called.

Last Updated: Oct 14, 2021