Selection & toolbar

Row selection, selected_ids, and ActionsOfSelection

Bulk actions and bulk-eligible row actions share the same selection model in tableColumns slice.

When selection is enabled

File: ./ApiTables/core/TableBody.tsx

RDT selectableRows is true when:

  1. bulkActions.length > 0, or
  2. Any structure row action has applicableAsBulkAction: true

Checkbox column uses ./ApiTables/general-components/Checkbox.tsx as RDT adapter.

Selection state

FieldUpdated by
selectedRowsRDT onSelectedRowsChange_setSelectedRows
selectedIdsDerived ids for API payloads

Clearing selection

Every data fetch in useTableFetcher:

dispatch(_setSelectedRows([]));
dispatch(_setToggledClearRow(!toggledClearRows));

toggledClearRows flip forces clearSelectedRows={!toggledClearRows} on RDT to reset internal selection UI.

Two toolbars

TableBulkActions (dropdown)

Structure bulk actions — always uses selected_ids + appliedFilters in POST unless modal flow opens first.

ActionsOfSelection (below toolbar)

When selectedRows.length > 0:

  • Renders intersected row actions from selectedRowActions
  • Same RowActionsElements as row menu with isBulk={true}
  • Only actions common to all selected rows with applicableAsBulkAction

Commented code once rendered separate bulk toolbar buttons; live UI uses row-action components for selection.

Row action intersection algorithm

File: ./ApiTables/table-utils/utils.tsxgetIntersectedRowActions

Takes array of row.actions objects from selected rows; returns action keys present in every row with matching action_key.

Confirmation rules for selection actions

ActionsOfSelection may open modal when action has:

  • Extra payload_keys beyond filters / selected_ids, or
  • need_confirmation

Bulk dropdown uses separate rules for create_withdrawal_bulk etc.

UX: selected count

ApiTablesComponent shows count above table when selectedRows.length > 0.

On this page