Modals & onSuccess

Row action modals and post-success behavior

Router: ./ApiTables/table-modals/ApiTablesModals.tsx + ./ApiTables/table-modals/RowActionsModals.tsx

ConditionModalState field
onSuccess === "DisplayOnModal"ViewRowDataclickedRowActionResponse
need_confirmationConfirmationModalclickedRowAction or bulk selectedBulkAction
action_type === "custom_control"Custom control PopupcustomControlAction
Special API pathAnnouncementSingleSame response popup

ViewRowData supports table layout, key/value grid, barcode display, and copy_value fields from response payload.

ConfirmationModal

confirmationFor: "rowAction" | "bulkAction"

On confirm:

  • Row → rowActionsPostHandler with row payload
  • Bulk → bulkActionsPostHandler with { filters, selected_ids }

onSuccess handlers (row)

Implemented in useUtilsProvider after successful POST:

onSuccessResult
reload_triggerTableReload()
deleteRowReload + clear clicked action
refetchDataReplace all rows from response.items
refetchRowPatch single row by id
downloadDatadownloadURL
download_pdf / downloadPdfPDF download helpers
generatePdfgeneratePDF component flow
OpenModalFormPopulate customControlAction; user closes popup manually
DisplayOnModalSet clickedRowActionResponse for view popup

Closing modals

ApiTablesModals.handleCloseModal clears:

  • clickedRowActionResponse
  • selectedBulkAction
  • clickedRowAction
  • customControlAction

handleCloseStaticModals clears rowSelectedModal (column datalist/html).

Loading UX

  • GeneralRowActionElement shows spinner when clickedRowActionId matches row
  • rowActionPostLoading available for global row POST state

On this page