Class: HiddenRows

HiddenRows

handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 55

Plugin allowing to hide certain rows.

Possible plugin settings:

  • copyPasteEnabled as Boolean (default true)
  • rows as Array
  • indicators as Boolean (default false)
Example
...
var hot = new Handsontable(document.getElementById('example'), {
  date: getData(),
  hiddenRows: {
    copyPasteEnabled: true,
    indicators: true,
    rows: [1, 2, 5]
  }
});
// Access to hiddenRows plugin instance:
var hiddenRowsPlugin = hot.getPlugin('hiddenRows');

// Show row programmatically:
hiddenRowsPlugin.showRow(1);
// Show rows
hiddenRowsPlugin.showRow(1, 2, 9);
// or
hiddenRowsPlugin.showRows([1, 2, 9]);
hot.render();
...
// Hide row programmatically:
hiddenRowsPlugin.hideRow(1);
// Hide rows
hiddenRowsPlugin.hideRow(1, 2, 9);
// or
hiddenRowsPlugin.hideRows([1, 2, 9]);
hot.render();
...

Members

hiddenRowsArray

List of hidden rows indexes.

lastSelectedRowNumber

Last selected row index.

Default Value:
  • -1

settingsObject

Cached settings from Handsontable settings.

Methods

handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 559

destroy()

Destroy the plugin.

handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 135

disablePlugin()

Disable the plugin.

handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 91

enablePlugin()

Enable the plugin.

handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 228

getLogicalRowIndex(row){Number}

Get the logical index of the provided row.

Parameters:
Name Type Description
row Number
Returns: {Number}
handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 190

hideRow(row)

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

Parameters:
Name Type Description
row Number

Row index.

handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 174

hideRows(rows)

Hide the rows provided in the array.

Parameters:
Name Type Description
rows Array

Array of row index.

handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 84

isEnabled(){Boolean}

Check if plugin is enabled.

Returns: {Boolean}
handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 201

isHidden(row, isLogicIndex){Boolean}

Check if given row is hidden.

Parameters:
Name Type Description
row Number

Column index.

isLogicIndex Boolean

flag which determines type of index.

Returns: {Boolean}
handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 503

onAfterCreateRow(index, amount)

Recalculate index of hidden rows after add row action

Parameters:
Name Type Description
index Number
amount Number
handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 521

onAfterRemoveRow(index, amount)

Recalculate index of hidden rows after remove row action

Parameters:
Name Type Description
index Number
amount Number
handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 165

showRow(row)

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

Parameters:
Name Type Description
row Number

Row index.

handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 149

showRows(rows)

Show the rows provided in the array.

Parameters:
Name Type Description
rows Array

Array of row index.

handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 123

updatePlugin()

Updates the plugin to use the latest options you have specified.