You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
It seems the deleting hook does not shows an error in case of unsuccessful result, though the actual delete action is prevented. In addition, the page is always redirected back to the list view after clicking on the 'OK' button.
To Reproduce
$form->deleting(function (Form$form, $id) {
thrownewException('You can\'t delete the model.');
// or even this doesn't workreturnresponse()->json([
'status' => false,
'message' => 'You can\'t delete the model.',
], 400);
});
Expected behavior
I would expect an error message and the page not to redirect to the list.
System
Open-admin version 1.0.27
PHP version 7.4
Laravel Version 8
OS: Mac
Browser chrome
The text was updated successfully, but these errors were encountered:
Describe the bug
It seems the
deleting
hook does not shows an error in case of unsuccessful result, though the actual delete action is prevented. In addition, the page is always redirected back to the list view after clicking on the 'OK' button.To Reproduce
Expected behavior
I would expect an error message and the page not to redirect to the list.
System
The text was updated successfully, but these errors were encountered: