refactor users' after delete to react-admin lifecycle hooks, fixes #50

This commit is contained in:
Aine
2024-09-29 19:46:00 +03:00
parent f3080e9468
commit 46cc0e2fda
2 changed files with 40 additions and 44 deletions

View File

@@ -35,6 +35,12 @@ const DeleteUserButton: React.FC<DeleteUserButtonProps> = (props) => {
{ ids: recordIds, meta: values },
{
onSuccess: () => {
notify("ra.notification.deleted", {
messageArgs: {
smart_count: recordIds.length,
},
type: 'info' as NotificationType,
});
handleDialogClose();
unselectAll();
redirect("/users");