Class: CollapsibleColumns

CollapsibleColumns

handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 48

The CollapsibleColumns plugin allows collapsing of columns, covered by a header with the colspan property defined.

Clicking the "collapse/expand" button collapses (or expands) all "child" headers except the first one.

Setting the collapsibleColumns property to true will display a "collapse/expand" button in every header with a defined
colspan property.

To limit this functionality to a smaller group of headers, define the collapsibleColumns property as an array of objects, as in
the example below.

Example
...
 collapsibleColumns: [
   {row: -4, col: 1, collapsible: true},
   {row: -3, col: 5, collapsible: true}
 ]
...
...
 collapsibleColumns: true
...

Members

buttonEnabledListObject

Object listing headers with buttons enabled.

collapsedSectionsObject

Object listing the currently collapsed sections.

columnHeaderLevelCountNumber

Number of column header levels.

eventManagerEventManager

Event manager instance reference.

hiddenColumnsPluginObject

Cached reference to the HiddenColumns plugin.

nestedHeadersPluginObject

Cached reference to the NestedHeaders plugin.

settingsBoolean Array

Cached plugin settings.

Methods

handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 225

checkDependencies()

Checks if all the required dependencies are enabled.

handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 379

collapseAll()

Collapse all collapsible sections.

handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 325

collapseSection(coords)

Collapse section at the provided coords.

Parameters:
Name Type Description
coords Object

Contains coordinates information. (coords.row, coords.col)

handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 512

destroy()

Destroy the plugin.

handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 139

disablePlugin()

Disable the plugin.

handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 110

enablePlugin()

Enable the plugin.

handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 386

expandAll()

Expand all collapsible sections.

handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 315

expandSection(coords)

Expand section at the provided coords.

Parameters:
Name Type Description
coords Object

Contains coordinates information. (coords.row, coords.col)

handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 248

generateIndicator(col, TH){HTMLElement}

Generates the indicator element.

Parameters:
Name Type Description
col Number

Column index.

TH HTMLElement

TH Element.

Returns: {HTMLElement}
handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 103

isEnabled(){boolean}

Check if the plugin is enabled.

Returns: {boolean}
handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 280

markSectionAs(state, row, column, recursive)

Mark (internally) a section as 'collapsed' or 'expanded' (optionally, also mark the 'child' headers).

Parameters:
Name Type Description
state String

State ('collapsed' or 'expanded').

row Number

Row index.

column Number

Column index.

recursive Boolean

If true, it will also attempt to mark the child sections.

handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 216

meetsDependencies(){Boolean}

Check if plugin dependencies are met.

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

onAfterRender()

AfterRender hook callback.

handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 200

parseSettings()

Parse the plugin settings and create a button configuration array.

handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 335

toggleAllCollapsibleSections(action)

Collapse or expand all collapsible sections, depending on the action parameter.

Parameters:
Name Type Description
action String

'collapse' or 'expand'.

handsontable-pro/src/plugins/collapsibleColumns/collapsibleColumns.js, line 396

toggleCollapsibleSection(coords, action)

Collapse/Expand a section.

Parameters:
Name Type Description
coords Object

Section coordinates.

action String

Action definition ('collapse' or 'expand').