Closed ibelar closed 1 year ago
usage:
$actionDelete = (new Table\Action(['reloadTable' => true]))->setTrigger(Button::factory(['label' => 'Delete', 'color' => 'neutral'])); $actionMsg = new Table\Action\Messages(); $actionMsg->single = 'This action will delete 1 country. Are you sure?'; $actionMsg->multiple = 'This action will delete {#} countries. Are you sure?'; $actionDelete->addConfirmationDialog('Delete countries:', $actionMsg); $table->addRowsAction($actionDelete)->onTrigger(function ($ids, $dialog) { // performs deletes on ids return JsStatements::with([JsToast::success('Delete Action! ' . implode(' / ', $ids)), $dialog->jsClose()]); });
usage:
Note: Required Fohn-js version 1.5