Skip to content

Commit

Permalink
fix(modal): fix the error of onCancel parameter of modal returned b…
Browse files Browse the repository at this point in the history
…y `useModal`

resolve: 36581

ref: ant-design#36581 (comment)
  • Loading branch information
Wxh16144 committed Jul 19, 2022
1 parent d383a87 commit e4fcb3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/modal/useModal/HookModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const HookModal: React.ForwardRefRenderFunction<HookModalRef, HookModalProps> =
setVisible(false);
const triggerCancel = args.some(param => param && param.triggerCancel);
if (innerConfig.onCancel && triggerCancel) {
innerConfig.onCancel();
innerConfig.onCancel(...args);
}
};

Expand Down

0 comments on commit e4fcb3e

Please sign in to comment.