Plugin allowing to hide certain rows.
Possible plugin settings:
copyPasteEnabled
asBoolean
(defaulttrue
)rows
asArray
indicators
asBoolean
(defaultfalse
)
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 564
destroy()
-
Destroy the plugin.
-
handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 136
disablePlugin()
-
Disable the plugin.
-
handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 92
enablePlugin()
-
Enable the plugin.
-
handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 229
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 191
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 175
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 85
isEnabled(){Boolean}
-
Check if plugin is enabled.
Returns: {Boolean}
-
handsontable-pro/src/plugins/hiddenRows/hiddenRows.js, line 202
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 508
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 526
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 166
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 150
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 124
updatePlugin()
-
Updates the plugin to use the latest options you have specified.