Update DeleteDialog.tsx

This commit is contained in:
Yassine
2025-01-27 06:09:35 +01:00
committed by GitHub
parent 21c4bd97e6
commit d532522461

View File

@@ -40,8 +40,8 @@ export const DeleteDialog = <T extends string = string>({
const options = {
onError: onDeleteError,
onSuccess: (data: unknown) => {
rest.setData?.(undefined);
onDeleteSuccess(data);
rest.reset?.();
},
};
const { mutateAsync: deleteOne } = useDelete(entity, options);