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

add an event for when the user clicks on the overlay/mask of a dialog #419

Closed
wc-matteo opened this issue Jul 6, 2021 · 6 comments · Fixed by #561
Closed

add an event for when the user clicks on the overlay/mask of a dialog #419

wc-matteo opened this issue Jul 6, 2021 · 6 comments · Fixed by #561
Assignees
Labels
feature request New feature or request

Comments

@wc-matteo
Copy link

This function solves the problem (这个功能解决的问题)

the ability to do something when the user closes the dialog that way

Expected API (期望的 API)

I'd use onClose for that as well, since technically it's a way to close the dialog

@Fnzero Fnzero closed this as completed Jul 7, 2021
@Fnzero Fnzero reopened this Jul 7, 2021
@Fnzero Fnzero added the feature request New feature or request label Jul 7, 2021
@Talljack Talljack self-assigned this Jul 19, 2021
@07akioni
Copy link
Collaborator

maskClosable 不够用吗?现在 useDialog 是不是支持了 maskClosable?有别的库有相关的属性吗?

@Talljack

@07akioni
Copy link
Collaborator

@wc-matteo Isn't maskClosable enough?

@wc-matteo
Copy link
Author

no. The issue here is that there is no event for when the user closes the dialog by clicking on the mask/overlay. So you have no way to know.

@Talljack
Copy link
Contributor

@07akioni I saw that both antd and iview are binding the mask click event to the onCancel event, other frame not support.

@07akioni
Copy link
Collaborator

no. The issue here is that there is no event for when the user closes the dialog by clicking on the mask/overlay. So you have no way to know.

In which scene you need to know this?

@wc-matteo
Copy link
Author

let's say there is a dialog with a confirmation. The user can confirm or he can cancel/close the dialog. If he closes the dialog by clicking on the mask/overlay, I have no way to react to that

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

Successfully merging a pull request may close this issue.

4 participants