Skip to content

Row actions ​

A list keeps the row actions of its index. Links (edit, detail, any GET action) open their page, leaving the form.

Confirmed actions ​

EasyAdmin binds its confirmation modal to the action buttons present when the page loads, so embedded-list.js binds the buttons of each list it loads. The modal is the page's: the edit page renders it outside its form.

A confirmed POST action, such as a delete, runs in place: the script posts the page's confirmation form (its ea-delete token) to the action's URL with fetch, then reloads the list. When the action fails (EasyAdmin answers 409 when a delete breaks a foreign key), the script submits the form instead, so the error page shows. With inline_actions: false, every confirmed action leaves the page.

A cancelled confirmation stays cancelled ​

EasyAdmin arms a one-off handler on the modal's confirm button each time an action opens it, and a cancelled confirmation leaves its handler armed. On an edit page with a Delete action, cancelling that Delete and then confirming a row's delete in a list would also delete the edited entity.

The script's handler for list actions runs first and stops the event, so only the confirmed row action runs, and it closes the modal itself. The browser tests cover this case.

Released under the MIT License.