mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: add data to the onSuccess method
This commit is contained in:
@@ -40,9 +40,9 @@ export const DeleteDialog = <T extends any = string>({
|
||||
onDeleteSuccess?: (data?: unknown) => void;
|
||||
}) => {
|
||||
const { t } = useTranslate();
|
||||
const onSuccess = () => {
|
||||
const onSuccess = (data: unknown) => {
|
||||
setData?.(undefined);
|
||||
onDeleteSuccess();
|
||||
onDeleteSuccess(data);
|
||||
};
|
||||
const { mutateAsync: deleteOne } = useDelete(entity, {
|
||||
onError: onDeleteError,
|
||||
|
||||
Reference in New Issue
Block a user