Note: This component event is designed to be used in tandem with a script runAction. Within the script action, special properties and methods are available on the event object, which is passed to the script action as a parameter.
event.column
String
The name of the column under which the cell was edited.
event.row
Number
The unique row index as it is represented in the source data. Also known as the row ID.
event.value
Any
The value that was typed into the cell.
# This example will set the value of a cell, based on what the user typed into it.
# Get the value that was typed into the cell
valueToSet = event.value
# We need to set a value in a particular cell. The event object contains row and column properties
# that report the position of the cell that was edited.
# If the data property contains an array, you would use the line below
self.props.data[event.row][event.column] = valueToSet
# If the data property contains a dataset, then you would want to use the following line instead
#self.props.data = system.dataset.setValue(self.props.data, event.row, event.column, valueToSet)
onSelectionChange
This onSelectionChange event will trigger when the selection in the chart changes.
Note: The onSelectionChange event will fire on startup or mount if props do not equal the table components default selection config.
This component event is designed to be used in tandem with a script runAction. Within the script action, special properties and methods are available on the event object, which is passed to the script action as a parameter.
event.selectedColumn
String or null
The name of the column that the selected cell is located under.
event.selectedRow
Number or null
The unique row index as it is represented in the source data. Also known as the row ID.
event.data
Array
Represents the currently selected entries. The contents of the array is based on the enabledRowSelection and enableColumnSelection properties as represented on the table below. The actual resulting value may include additional values if the selection mode on the table is set to "single interval" or "multiple interval".
enabledRowSelection | enableColumnSelection | Resulting return type | Example Output |
---|
True | False | An array containing a number of JSON objects that each represent a single row. Each JSON object contains one key-value pair for each column on the table. |
[{"city":"Folsom","country":"United States", "population":77271}]
|
False | True | An array of JSON objects, where each object represents a separate row in the selected column. Each object contains a single key-value pair, where the key is the column name and the value is the value of the cell. |
[{"city":"Folsom"}, {"city":"Helsinki"},
{"city":"Jakarta"},]
|
True | True | An array containing a single JSON object, which can be treated like a Python dictionary. | |
onEditCellStart
This onEditCellStart event fires when the user starts editing a cell. For onEditCellStart, the value is the initial value before any edits.
Note: This component event is designed to be used in tandem with a script runAction. Within the script action, special properties and methods are available on the event object, which is passed to the script action as a parameter.
event.column
String or number
The column the editing cell is positioned under.
event.row
Number
The unique row index as it is represented in the source data. Also known as the row ID.
event.rowIndex
Number
The row index as it is represented in the current visible data. Useful in cases where some of the rows are hidden, such as when filtering.
event.value
Any
The value of the cell before editing began.
onEditCellCancel
This onEditCellCancel event is fired when the user has canceled a cell edit and has exited editing mode by effectively pressing the escape key.
Note: This component event is designed to be used in tandem with a script runAction. Within the script action, special properties and methods are available on the event object, which is passed to the script action as a parameter.
event.column
String
The column name of the cell being edited.
event.row
Number
The unique row index as it is represented in the source data. Also known as the row ID.
event.rowIndex
Number
The row index as it is represented in the current visible data. Useful in cases where some of the rows are hidden, such as when filtering.
event.value
Any
The value of the cell before editing began.
onRowClick
This onRowClick event is fired when a row in the table is clicked.
Note: This component event is designed to be used in tandem with a script runAction. Within the script action, special properties and methods are available on the event object, which is passed to the script action as a parameter.
event.row
Number
The unique row index as it is represented in the source data. Also known as the row ID.
event.rowIndex
Number
The row index as it is represented in the current visible data. Useful in cases where some of the rows are hidden, such as when filtering.
event.value
PlainObject
The rows value as a JSON object.
onRowDoubleClick
This onRowDoubleClick event is triggered when a row in the table is double clicked.
Note: This component event is designed to be used in tandem with a script runAction. Within the script action, special properties and methods are available on the event object, which is passed to the script action as a parameter.
event.row
Number
The unique row index as it is represented in the source data. Also known as the row ID.
event.rowIndex
Number
The row index as it is represented in the current visible data. Useful in cases where some of the rows are hidden, such as when filtering.
event.value
PlainObject
The rows value as a JSON object.
onSubviewExpand
This onSubviewExpand event is triggered when a row subview is expanded.
Note: This component event is designed to be used in tandem with a script runAction. Within the script action, special properties and methods are available on the event object, which is passed to the script action as a parameter.
event.row
Number
The unique row index as it is represented in the source data. Also known as the row ID.
event.rowIndex
Number
The row index as it is represented in the current visible data. Useful in cases where some of the rows are hidden, such as when filtering.
event.value
PlainObject
The rows value as a JSON object.
onSubviewCollapse
This onSubviewCollapse event is triggered when a row subview is collapsed.
Note: This component event is designed to be used in tandem with a script runAction. Within the script action, special properties and methods are available on the event object, which is passed to the script action as a parameter.
event.row
Number
The unique row index as it is represented in the source data. Also known as the row ID.
event.rowIndex
Number
The row index as it is represented in the current visible data. Useful in cases where some of the rows are hidden, such as when filtering.
event.value
PlainObject
The rows value as a JSON object.