Row actions overview
How per-row actions are defined, rendered, and executed
Row actions come from the control table structure and per-row row.actions on data rows. They appear in a dedicated actions column or inline per column depending on structure.
Structure → Redux
ApiTablesController dispatches _getStructureRowActions with flattened actions:
- If structure has
general_actions, nested maps are flattened to a single list _checkActionsInRegularCells(true)when actions are keyed by column name
Rendering (./ApiTables/core/TableRowActions.tsx)
| Mode | When |
|---|---|
| Popover menu | Default — list of actions in dropdown |
| Inline buttons | col.separated_action === true |
| Per-column subset | actionsInRegularCells → row.actions[col.name] |
| Full row set | row.actions object keys |
Each action maps to a component in RowActionsElements.tsx by action_type.
Selection intersection
When user selects rows (react-data-table-component):
// Effect in TableRowActions
dispatch(_getSelectedRowActions(
getIntersectedRowActions(selectedRows.map(r => r.actions))
));Only actions marked applicableAsBulkAction appear in ActionsOfSelection toolbar for multi-row use.
Execution path
- User triggers action in
RowActionsElements - If
requireModal(action)→ setclickedRowAction(confirmation or custom_control prefetch) - Else →
rowActionsPostHandlerwith row id /selected_ids - Success handlers in
useUtilsProviderupdate data or open modals
requireModal:
action?.need_confirmation || action?.action_type === 'custom_control'Files
| File | Role |
|---|---|
./ApiTables/core/TableRowActions.tsx | Menu / inline actions |
./ApiTables/general-components/RowActionsElements.tsx | toggle, redirect, copy, general POST |
./ApiTables/core/ActionsOfSelection.tsx | Selected-row action bar |
./ApiTables/table-modals/RowActionsModals.tsx | View + confirmation |
./ApiTables/table-providers/slices/rowActionsSlice.ts | Action state |