Class: ColumnStatesManager

ColumnStatesManager

Store and manages states of sorted columns.

Members

compareFunctionFactory

Determines compare function factory. Method get as parameters sortOder and columnMeta and return compare function.

compareFunctionFactory

Determines compare function factory. Method get as parameters sortOder and columnMeta and return compare function.

headerActionBoolean

Determines whether click on the header perform sorting.

headerActionBoolean

Determines whether click on the header perform sorting.

indicatorBoolean

Determines whether indicator should be visible (for sorted columns).

indicatorBoolean

Determines whether indicator should be visible (for sorted columns).

sortedColumnsStatesArray

Queue of sort states containing sorted columns and their orders (Array of objects containing column and sortOrder properties).

sortedColumnsStatesArray

Queue of sort states containing sorted columns and their orders (Array of objects containing column and sortOrder properties).

sortEmptyCellsBoolean

Determines whether we should sort empty cells.

sortEmptyCellsBoolean

Determines whether we should sort empty cells.

Methods

destroy()

Destroy the state manager.

destroy()

Destroy the state manager.

getAllColumnsProperties(){Object}

Get all column properties which affect the sorting result.

Returns: {Object}

getAllColumnsProperties(){Object}

Get all column properties which affect the sorting result.

Returns: {Object}

getColumnSortState(column){Object|undefined}

Get sort state for particular column. Object contains column and sortOrder properties.

Note: Please keep in mind that returned objects expose physical column index under the column key.

Parameters:
Name Type Description
column Number

Physical column index.

Returns: {Object|undefined}

getColumnSortState(column){Object|undefined}

Get sort state for particular column. Object contains column and sortOrder properties.

Note: Please keep in mind that returned objects expose physical column index under the column key.

Parameters:
Name Type Description
column Number

Physical column index.

Returns: {Object|undefined}

getFirstSortedColumn(){Number|undefined}

Get index of first sorted column.

Returns: {Number|undefined}

getFirstSortedColumn(){Number|undefined}

Get index of first sorted column.

Returns: {Number|undefined}

getIndexOfColumnInSortQueue(column){Number}

Get order of particular column in the states queue.

Parameters:
Name Type Description
column Number

Physical column index.

Returns: {Number}

getIndexOfColumnInSortQueue(column){Number}

Get order of particular column in the states queue.

Parameters:
Name Type Description
column Number

Physical column index.

Returns: {Number}

getNumberOfSortedColumns(){Number}

Get number of sorted columns.

Returns: {Number}

getNumberOfSortedColumns(){Number}

Get number of sorted columns.

Returns: {Number}

getSortedColumns(){Array}

Get list of sorted columns.

Returns: {Array}

getSortedColumns(){Array}

Get list of sorted columns.

Returns: {Array}

getSortOrderOfColumn(searchedColumn){String|undefined}

Get sort order of column.

Parameters:
Name Type Description
searchedColumn Number

Physical column index.

Returns: {String|undefined} Sort order (asc for ascending, desc for descending and undefined for not sorted).

getSortOrderOfColumn(searchedColumn){String|undefined}

Get sort order of column.

Parameters:
Name Type Description
searchedColumn Number

Physical column index.

Returns: {String|undefined} Sort order (asc for ascending, desc for descending and undefined for not sorted).

getSortStates(){Array}

Get states for all sorted columns.

Returns: {Array}

getSortStates(){Array}

Get states for all sorted columns.

Returns: {Array}

isColumnSorted(column){Boolean}

Get if particular column is sorted.

Parameters:
Name Type Description
column Number

Physical column index.

Returns: {Boolean}

isColumnSorted(column){Boolean}

Get if particular column is sorted.

Parameters:
Name Type Description
column Number

Physical column index.

Returns: {Boolean}

isListOfSortedColumnsEmpty(){Boolean}

Get if list of sorted columns is empty.

Returns: {Boolean}

isListOfSortedColumnsEmpty(){Boolean}

Get if list of sorted columns is empty.

Returns: {Boolean}

setSortStates(sortStates)

Set all sorted columns states.

Parameters:
Name Type Description
sortStates Array

setSortStates(sortStates)

Set all sorted columns states.

Parameters:
Name Type Description
sortStates Array

updateAllColumnsProperties(allSortSettings)

Update column properties which affect the sorting result.

Note: All column properties can be overwritten by columns option.

Parameters:
Name Type Description
allSortSettings Object

Column sorting plugin's configuration object.

updateAllColumnsProperties(allSortSettings)

Update column properties which affect the sorting result.

Note: All column properties can be overwritten by columns option.

Parameters:
Name Type Description
allSortSettings Object

Column sorting plugin's configuration object.

ColumnStatesManager

Store and manages states of sorted columns.

Members

compareFunctionFactory

Determines compare function factory. Method get as parameters sortOder and columnMeta and return compare function.

compareFunctionFactory

Determines compare function factory. Method get as parameters sortOder and columnMeta and return compare function.

headerActionBoolean

Determines whether click on the header perform sorting.

headerActionBoolean

Determines whether click on the header perform sorting.

indicatorBoolean

Determines whether indicator should be visible (for sorted columns).

indicatorBoolean

Determines whether indicator should be visible (for sorted columns).

sortedColumnsStatesArray

Queue of sort states containing sorted columns and their orders (Array of objects containing column and sortOrder properties).

sortedColumnsStatesArray

Queue of sort states containing sorted columns and their orders (Array of objects containing column and sortOrder properties).

sortEmptyCellsBoolean

Determines whether we should sort empty cells.

sortEmptyCellsBoolean

Determines whether we should sort empty cells.

Methods

destroy()

Destroy the state manager.

destroy()

Destroy the state manager.

getAllColumnsProperties(){Object}

Get all column properties which affect the sorting result.

Returns: {Object}

getAllColumnsProperties(){Object}

Get all column properties which affect the sorting result.

Returns: {Object}

getColumnSortState(column){Object|undefined}

Get sort state for particular column. Object contains column and sortOrder properties.

Note: Please keep in mind that returned objects expose physical column index under the column key.

Parameters:
Name Type Description
column Number

Physical column index.

Returns: {Object|undefined}

getColumnSortState(column){Object|undefined}

Get sort state for particular column. Object contains column and sortOrder properties.

Note: Please keep in mind that returned objects expose physical column index under the column key.

Parameters:
Name Type Description
column Number

Physical column index.

Returns: {Object|undefined}

getFirstSortedColumn(){Number|undefined}

Get index of first sorted column.

Returns: {Number|undefined}

getFirstSortedColumn(){Number|undefined}

Get index of first sorted column.

Returns: {Number|undefined}

getIndexOfColumnInSortQueue(column){Number}

Get order of particular column in the states queue.

Parameters:
Name Type Description
column Number

Physical column index.

Returns: {Number}

getIndexOfColumnInSortQueue(column){Number}

Get order of particular column in the states queue.

Parameters:
Name Type Description
column Number

Physical column index.

Returns: {Number}

getNumberOfSortedColumns(){Number}

Get number of sorted columns.

Returns: {Number}

getNumberOfSortedColumns(){Number}

Get number of sorted columns.

Returns: {Number}

getSortedColumns(){Array}

Get list of sorted columns.

Returns: {Array}

getSortedColumns(){Array}

Get list of sorted columns.

Returns: {Array}

getSortOrderOfColumn(searchedColumn){String|undefined}

Get sort order of column.

Parameters:
Name Type Description
searchedColumn Number

Physical column index.

Returns: {String|undefined} Sort order (asc for ascending, desc for descending and undefined for not sorted).

getSortOrderOfColumn(searchedColumn){String|undefined}

Get sort order of column.

Parameters:
Name Type Description
searchedColumn Number

Physical column index.

Returns: {String|undefined} Sort order (asc for ascending, desc for descending and undefined for not sorted).

getSortStates(){Array}

Get states for all sorted columns.

Returns: {Array}

getSortStates(){Array}

Get states for all sorted columns.

Returns: {Array}

isColumnSorted(column){Boolean}

Get if particular column is sorted.

Parameters:
Name Type Description
column Number

Physical column index.

Returns: {Boolean}

isColumnSorted(column){Boolean}

Get if particular column is sorted.

Parameters:
Name Type Description
column Number

Physical column index.

Returns: {Boolean}

isListOfSortedColumnsEmpty(){Boolean}

Get if list of sorted columns is empty.

Returns: {Boolean}

isListOfSortedColumnsEmpty(){Boolean}

Get if list of sorted columns is empty.

Returns: {Boolean}

setSortStates(sortStates)

Set all sorted columns states.

Parameters:
Name Type Description
sortStates Array

setSortStates(sortStates)

Set all sorted columns states.

Parameters:
Name Type Description
sortStates Array

updateAllColumnsProperties(allSortSettings)

Update column properties which affect the sorting result.

Note: All column properties can be overwritten by columns option.

Parameters:
Name Type Description
allSortSettings Object

Column sorting plugin's configuration object.

updateAllColumnsProperties(allSortSettings)

Update column properties which affect the sorting result.

Note: All column properties can be overwritten by columns option.

Parameters:
Name Type Description
allSortSettings Object

Column sorting plugin's configuration object.