Skip to main content

Table Actions

Table actions are user interactions that either modify local state (Edit Row Mode) or trigger backend events (Data Mode).


Edit Row Mode

ActionDescription
Add buttonVisible when Hide Add Button is not checked. Clicking the button creates a new empty row in the table. No event is sent to the backend.

Data Mode

In Data Mode, user interactions trigger runFormEvent from FormHostProvider and send a named event to the backend. The backend uses the widgetName and widgetEvent properties on the incoming request to identify the event and respond appropriately.

ActionEvent SentNotes
Add buttononTableCreateRecordEventVisible when Hide Add Button is not checked. The backend should respond using the OpenModal response structure to display an appropriate form.
Top bar "Download" buttononTableRunBatchActionEventVisible when one or more rows are selected. Requires Row Selection to be enabled.
Top bar "Delete" buttononTableRunBatchActionEventVisible when one or more rows are selected. Requires Row Selection to be enabled.
Row action (menu or flat)onTableRunActionEventVisible when at least one option is selected under Row Actions in the widget properties.
Table load / Pagination controlsonTableLoadDataFired on initial table load and whenever the user interacts with any pagination control (rows per page, page number, next/previous).

Event Details

onTableCreateRecordEvent

Fired when the user clicks the Add button in Data Mode.

The backend should:

  1. Detect the event via widgetEvent === "onTableCreateRecordEvent"
  2. Return an OpenModal response to display a form for creating a new record
  3. After the user saves the modal form, refresh the table data

onTableRunBatchActionEvent

Fired when the user clicks Download or Delete from the top toolbar after selecting one or more rows.

The request payload contains the IDs (or row data) of all selected rows. The backend should:

  1. Identify the action type from the request
  2. Process all selected rows accordingly
  3. Return an appropriate response (e.g., refresh table or return a file download)

onTableRunActionEvent

Fired when the user selects a row-level action from the row action menu or flat buttons.

The request payload contains the data of the target row. The backend should:

  1. Identify which action was selected
  2. Process the row accordingly (e.g., open a detail form, trigger a workflow)

onTableLoadData

Fired on initial table load and whenever the user interacts with a pagination control (rows per page, page number, next/previous).

The request payload contains table metadata including:

  • rowsPerPage — number of rows requested
  • nextToken — continuation token from the previous response (empty string on first load)
  • Current filter and sort state

The backend should return the requested page of data along with updated tableMeta. See the Pagination Guide for full backend implementation examples.