[ type ] RowEvent

Description:

Represents a table row event triggered by a Table component Table > onRowEvents events.

Type: Object

Properties:

Name Type Description

target

Table

The Table component that triggered the event.

type

string

Type of the row event: insert, remove, update.

[row]

number

Index of the affected row. Present when a single row is affected.

[column]

number

Column index of the affected cell. Only present when type is update.
A value of -1 means all columns in the row were affected.

[fromRow]

number

Start index of affected row range. Present when multiple rows are affected.

[toRow]

number

End index of affected row range. Present when multiple rows are affected.

[interactive]

boolean

Only present when type is update.
true if the update was triggered by user interaction, false if done programmatically.

Examples:

Single row insert event:

const e = {
  target: table,
  type: "insert",
  row: 3
};

Cell update by user:

const e = {
  target: table,
  type: "update",
  row: 2,
  column: 1,
  interactive: true
};

Range removal:

const e = {
  target: table,
  type: "remove",
  fromRow: 5,
  toRow: 10
};

Also See: