Row action types

action_type values and their UI behavior

Defined in structure and echoed on each row.actions entry. Rendered in ./ApiTables/general-components/RowActionsElements.tsx.

action_type reference

action_typeComponentBehavior
toggleToggleRowActionElementSwitch UI; POST on change; modal if need_confirmation
redirectRedirectRowActionElementInternal Next.js Link to redirect_routes.api
external_redirectExternalRedirectRowActionElement<a target="_blank">
copyCopyRowActionElementcopyToClipboard(copy_value)
(default)GeneralRowActionElementPOST to action.api; loading state per row id
custom_controlGeneralRowActionElementPOST + onSuccess: OpenModalForm → custom popup

General / custom_control POST

rowActionsPostHandler(
  action.method,
  action.action.api.replace('/api', ''),
  { /* row id or selected_ids */ },
  action,
  customHeader?
);

For bulk-style row actions (isBulk on action), payload uses selected_ids from tableColumns.selectedIds.

Toggle specifics

  • Uses action.toggle_current_value for controlled switch state
  • Bulk variant passes isBulk: true and selected ids

Redirect specifics

  • redirect uses i18n-aware Link from @/i18n/navigation
  • external_redirect does not use locale routing

Copy specifics

Uses copyToClipboard with optional toast (default Arabic success message in util).

Backend fields commonly used

FieldPurpose
button.labelVisible label
methodHTTP method
action.api / action.webEndpoint
need_confirmationOpens ConfirmationModal
onSuccessPost-action strategy (see modals doc)
applicableAsBulkActionEligible in selection toolbar
action_keySpecial cases (exports, etc.)

On this page