SortOrder

SortOrder

new SortOrder(options) → {Array}

Source:

Creates a sortOrder array

Parameters:
Name Type Description
options Object

configuration options

Properties
Name Type Attributes Description
columns Object

an array of columns from TableColumns

sortCallback function

function that performs sorting based on the sortOrder

sortCallbackScope Object

scope in which sort callback needs to be executed

defaultSorting Object <optional>

an array of objects that specify default sorting

Properties
Name Type Description
column Number

column index

direction String

sort direction (asc|desc)

Returns:
Type
Array

Methods

add(objnon-null)

Source:

Adds another column to be sorted

Parameters:
Name Type Description
obj Object

object describing sorting

Properties
Name Type Description
column Number

column index

direction String

sort direction (asc|desc)

getCell(columnIndexnon-null) → {Object}

Source:

Returns an array containing a cell from the table and a reference cell (refCell) from the floating header if any

Parameters:
Name Type Description
columnIndex Number

index of the column from the array of columns from TableColumns

Returns:
Type
Object

remove(column, index)

Source:

Removes a column from sortOrder

Parameters:
Name Type Description
column Number

column index as reference to the item to be removed.

index Number

index of item in sortOrder array to be removed

replace(objnon-null)

Source:

Replaces all items in sortOrder

Parameters:
Name Type Description
obj Object

object describing sorting

Properties
Name Type Description
column Number

column index

direction String

sort direction (asc|desc)