Skip to content

HiddenRows

Options

hiddenRows

Source code

hiddenRows.hiddenRows : boolean | object

The hiddenRows option configures the HiddenRows plugin.

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

SettingDescription
falseDisable the HiddenRows plugin
trueEnable the HiddenRows plugin with the default plugin options
An object- Enable the HiddenRows plugin
- Modify the plugin options

If you set the hiddenRows to an object, you can set the following HiddenRows plugin options:

PropertyPossible valuesDescription
rows An array of indexesAn array of indexes of rows that are hidden at initialization
copyPasteEnabledtrue | falsetrue: when copying or pasting data, take hidden rows into account
false: when copying or pasting data, don’t take hidden rows into account
indicatorstrue | falsetrue: display UI markers to indicate the presence of hidden rows
false: display UI markers

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 `HiddenRows` plugin
hiddenRows: true,
// enable `HiddenRows` plugin, and modify the plugin options
hiddenRows: {
// set rows that are hidden by default
rows: [5, 10, 15],
// when copying or pasting data, take hidden rows into account
copyPasteEnabled: true,
// show where hidden rows are
indicators: true
}

Members

DEFAULT_SETTINGS

Source code

HiddenRows.DEFAULT_SETTINGS

Returns the default settings applied when the plugin is enabled without explicit configuration.

PLUGIN_KEY

Source code

HiddenRows.PLUGIN_KEY

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

PLUGIN_PRIORITY

Source code

HiddenRows.PLUGIN_PRIORITY

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

Methods

destroy

Source code

hiddenRows.destroy()

Destroys the plugin instance.

disablePlugin

Source code

hiddenRows.disablePlugin()

Disables the plugin functionality for this Handsontable instance.

enablePlugin

Source code

hiddenRows.enablePlugin()

Enables the plugin functionality for this Handsontable instance.

getHiddenRows

Source code

hiddenRows.getHiddenRows() ⇒ Array<number>

Returns an array of visual indexes of hidden rows.

hideRow

Source code

hiddenRows.hideRow(…row)

Hides the row provided as row index (counting from 0).

ParamTypeDescription
…rownumberVisual row index.

hideRows

Source code

hiddenRows.hideRows(rows)

Hides the rows provided in the array.

ParamTypeDescription
rowsArray<number>Array of visual row indexes.

isEnabled

Source code

hiddenRows.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 HiddenRows#enablePlugin method is called.

isHidden

Source code

hiddenRows.isHidden(row) ⇒ boolean

Checks if the provided row is hidden.

ParamTypeDescription
rownumberVisual row index.

isValidConfig

Source code

hiddenRows.isValidConfig(hiddenRows) ⇒ boolean

Checks whether all of the provided row indexes are within the bounds of the table.

ParamTypeDescription
hiddenRowsArrayList of hidden visual row indexes.

showRow

Source code

hiddenRows.showRow(…row)

Shows the row provided as row index (counting from 0).

ParamTypeDescription
…rownumberVisual row index.

showRows

Source code

hiddenRows.showRows(rows)

Shows the rows provided in the array.

ParamTypeDescription
rowsArray<number>Array of visual row indexes.

updatePlugin

Source code

hiddenRows.updatePlugin()

Updates the plugin’s state.

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