Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal&Dialog: onConfirm 返回类型 #6789

Open
guoyunhe opened this issue Dec 4, 2024 · 0 comments
Open

Modal&Dialog: onConfirm 返回类型 #6789

guoyunhe opened this issue Dec 4, 2024 · 0 comments

Comments

@guoyunhe
Copy link
Contributor

guoyunhe commented Dec 4, 2024

Version of antd-mobile

No response

What is this feature about?

目前 onConfirm 的类型为 () => void | Promise<void>,阻止弹窗关闭的唯一方式是返回 Promise.reject()。但是这会导致控制台报错 unhandled rejection 被一些监控系统记录到,不是很友好。

建议方案是支持返回 false | Promise<false> 来阻止关闭弹窗。

破坏性变更,建议 v6 采纳。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant