[ type ] ColumnEvent

Description:

Represents a table column event triggered by a Table component.

Type: Object

Properties:

Name Type Description

target

Table

The Table component that triggered the event.

type

string

Type of the column event: insert, remove, move, resize;

[index]

number

Column index. Present when type is insert, remove, or resize.

[fromIndex]

number

Previous column index. Present when type is move.

[toIndex]

number

New column index. Present when type is move.

[fromSize]

number

Previous column size. Present when type is resize.

[toSize]

number

New column size. Present when type is resize.

[interactive]

boolean

Present for move events. true if triggered by user interaction, false if done programmatically.

Examples:

Insert column:

const e = {
  target: table,
  type: "insert",
  index: 2
};

Move column:

const e = {
  target: table,
  type: "move",
  fromIndex: 1,
  toIndex: 4,
  interactive: true //
};

Resize column:

const e = {
  target: table,
  type: "resize",
  index: 3,
  fromSize: 120,
  toSize: 200
};

Also See: