Class: TrimRows

TrimRows

handsontable-pro/src/plugins/trimRows/trimRows.js, line 43

Plugin allowing hiding of certain rows.

Example
...
var hot = new Handsontable(document.getElementById('example'), {
  date: getData(),
  trimRows: [1, 2, 5]
});
// Access to trimRows plugin instance:
var trimRowsPlugin = hot.getPlugin('trimRows');

// Hide row programmatically:
trimRowsPlugin.trimRow(1);
// Show rows
trimRowsPlugin.trimRow(1, 2, 9);
// or
trimRowsPlugin.trimRows([1, 2, 9]);
hot.render();
...
// Show row programmatically:
trimRowsPlugin.untrimRow(1);
// Hide rows
trimRowsPlugin.untrimRow(1, 2, 9);
// or
trimRowsPlugin.untrimRows([1, 2, 9]);
hot.render();
...

Members

removedRowsArray

List of last removed row indexes.

rowsMapperRowsMapper

Object containing visual row indexes mapped to data source indexes.

trimmedRowsArray

List of trimmed row indexes.

Methods

handsontable-pro/src/plugins/trimRows/trimRows.js, line 258

destroy()

Destroy plugin.

handsontable-pro/src/plugins/trimRows/trimRows.js, line 111

disablePlugin()

Disable the plugin.

handsontable-pro/src/plugins/trimRows/trimRows.js, line 78

enablePlugin()

Enable the plugin.

handsontable-pro/src/plugins/trimRows/trimRows.js, line 71

isEnabled(){Boolean}

Check if plugin is enabled.

Returns: {Boolean}
handsontable-pro/src/plugins/trimRows/trimRows.js, line 177

isTrimmed(){Boolean}

Check if given row is hidden.

Returns: {Boolean}
handsontable-pro/src/plugins/trimRows/trimRows.js, line 210

onAfterCreateRow(index, amount)

On after create row listener.

Parameters:
Name Type Description
index Number

Row index.

amount Number

Defines how many rows removed.

handsontable-pro/src/plugins/trimRows/trimRows.js, line 141

trimRow(row)

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

Parameters:
Name Type Description
row Number

Row index.

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

trimRows(rows)

Trim the rows provided in the array.

Parameters:
Name Type Description
rows Array

Array of row index.

handsontable-pro/src/plugins/trimRows/trimRows.js, line 184

untrimAll()

Untrim all trimmed rows.

handsontable-pro/src/plugins/trimRows/trimRows.js, line 168

untrimRow(row)

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

Parameters:
Name Type Description
row Number

Row index.

handsontable-pro/src/plugins/trimRows/trimRows.js, line 150

untrimRows(rows)

Untrim the rows provided in the array.

Parameters:
Name Type Description
rows Array

Array of row index.

handsontable-pro/src/plugins/trimRows/trimRows.js, line 101

updatePlugin()

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