-
Notifications
You must be signed in to change notification settings - Fork 77
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
fix(modal): changing the open property no longer calls beforeClose #7042
Conversation
…6407 introduces a close public method which will call beforeClose
@jcfranco I heard back from Stencil regarding validation in the watcher. Here is their response:
So we can revert changes in the watcher. However, since our If the I think I lean towards not having the watcher flip the property for this reason. What do you think? If we don't flip the property, users will just have to call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, but some people may see this as a breaking change since they may be relying on this behavior. I'll wait for Franco for final review due to that.
Nitpick: can you change "should" to "does" in the PR title. Or: "... property no longer calls beforeClose"
Something else that we could do instead of this would be to introduce an internal state that handles the open prop as well as the beforeClose. So if a user sets the open prop to false it won't actually close until both the open prop and beforeClose have resolved. That would eliminate any temporary style changes. We would likely need to update our CSS to not use the open attribute and use a class instead. @jcfranco is this what you want to pursue? |
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
Ping @jcfranco |
Related Issue: #6407 #6379
Summary
open
will no longer callbeforeClose
.beforeClose
when modifying the property.beforeClose