Show:

A base class for DataTableSelection.

Constructor

A.DataTableSelection

(
  • config
)

Parameters:

  • config Object

    Object literal specifying widget configuration properties.

Methods

_afterActiveCoordChange

(
  • event
)
protected

Focus the active cell on datatable sorting.

Parameters:

_bindSelectionUI

() protected

Bind the selection UI.

_getActiveCell

() protected

Return the active cell.

_getActiveRow

() protected

Return the active row.

_onSelectionKey

(
  • event
)
protected

Fires on key event with the listened selection keys.

Parameters:

_onSelectionMouseDown

(
  • event
)
protected

Fires on mousedown event.

Parameters:

_onSelectionMouseEnter

(
  • event
)
protected

Fires on mouseenter event.

Parameters:

_onSelectionMouseUp

(
  • event
)
protected

Fires on mouseup event.

Parameters:

_parseRange

(
  • val
)
Array protected

Parse selection coordinates range.

Parameters:

  • val Array

Returns:

Array:

coords

_setColumns

() protected

DataTable columns configuration breaks on n-depth cloning complex objects See http://yuilibrary.com/projects/yui3/ticket/2532597

_setSelection

(
  • val
)
Object protected

Set selection.

Parameters:

  • val Object

Returns:

Object:

Selected cells and rows.

captureSelection

(
  • coords
)
Object

Return the selected cells and within the coordinates coords.

Parameters:

  • coords Object

    Cell coordinates.

Returns:

Object:

Selected cells and rows.

destroy

() protected

Destructor lifecycle implementation for the A.DataTableSelection class. Detaches _selectionKeyHandler event listener.

getActiveColumn

() Object

Gets the active column based off the activeCell attribute.

Returns:

Object:

Active column.

getActiveRecord

() Object

Gets the active record based odd the activeRow attribute.

Returns:

Object:

Active record.

getColumn

(
  • seed
)
Object

Calculate and return the column based on the passed seed.

Parameters:

Returns:

Object:

Column.

getCoord

(
  • seed
)
Array

Gets the cell coordinates of the passed seed.

Parameters:

Returns:

Array:

Cell coordinates.

getRow

(
  • seed
)
Object

Return the row based on the passed seed.

Add support to get a row by seed on DataTable getRow See http://yuilibrary.com/projects/yui3/ticket/2532605

Parameters:

Returns:

Object:

Row.

initializer

() protected

Construction logic executed during A.DataTableSelection instantiation. Lifecycle.

Properties

ATTRS

Object static

Static property used to define the default attribute configuration for the A.DataTableSelection.

Attributes

activeCell

Node

Defines the active cell of the A.DataTableSelection.

activeCoord

Array

Defines and stores the active cell coordinates, [row, cell], of the A.DataTableSelection.

Default: [-1, -1]

activeRow

Node

Defines the active row of the A.DataTableSelection.

selection

Object

Defines the selected cells and rows of the A.DataTableSelection.

tabIndex

Number

Defines and stores the tabIndex of the activeCell.

Default: 0