-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
bug: Modal property canDismiss complicated usage since v6.4.0 and interface missing #26544
Comments
Thanks for the issue! This issue has been labeled as |
Hello @Unkn0wn0x appreciate you reporting this issue! I've opened two PRs to fix the documentation and type definition for the The majority of the team is on vacation for the holidays until after the New Year. I'm going to leave this issue untriaged in the interim, so that the team can discuss your feedback regarding |
@sean-perkins Thanks for your efforts, looks and sounds good to me. And I wish you already a happy new year! |
Hello @Unkn0wn0x I spoke with the team about the state of We reached the conclusion that the migration from The reason for this decision, is the current As with all things, decisions are fluid and as we learn more and gauge the community migrating implementations in v7, we will continue to try and improve the developer experience, if gaps exist. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prerequisites
Ionic Framework Version
Current Behavior
Related feature request: #26292
Related pull request: #26384
It has been forgotten to update the
<ion-modal>
interface definition, as you can see here for the propertycanDismiss
:The interface definition for
canDismiss
does not allow the newdata
androle
parameter, whereas the modal itself can handle it.Same for the official documentation here:
On the other hand the usage of the modal
canDismiss
property is imho too complicated, f. e. with the deprecatedswipeToClose
attribute it looked like following:Now (with v.6.4.1) it looks like the following:
This works as expected, if I call the method
this.modalCtrl.dismiss()
the modal closes, if I try to swipe-to-close it, it does not work. It's also possible to pass arguments withinthis.modalCtrl.dismiss(data, role)
.But why it requires an
async
function with therole
parameter as second argument? Also there is a lack of documentation for the possible (default)role
's, f. e.gesture
when trying to swipe-to-close the modal.Expected Behavior
Updated usage documentation:
Updated interface:
Maybe a simpler usage of the
canDismiss
property as described in #26292 with therole
argument at first place?Steps to Reproduce
Try to pass a function instead of an boolean on the
canDismiss
property, the compiler will throw an error, that's not possible.Code Reproduction URL
No response
Ionic Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: