bug: React IonModal component doesn't support documented events
See original GitHub issueBug Report
Ionic version:
[x] **4.11.5
Current behavior:
The docs for IonModal list four events it supports. Of these, the only one that’s actually available based on the types is onDidDismiss
.
Expected behavior: The types, and the implementation support all four events.
Steps to reproduce:
Create an app that tries to use the onDidPresent
event as a prop on an IonModal
, it will fail when TS does its compile step.
Related code:
The props for IonModal
come from createOverlayComponent
, which uses ReactOverlayProps
to define some things. The type for ReactOverlayProps
supports onDidDismiss
but none of the other events.
Other information:
Ionic info:
Ionic:
Ionic CLI : 5.4.4 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/react 4.11.5
Capacitor:
Capacitor CLI : 1.3.0
@capacitor/core : 1.3.0
Utility:
cordova-res : not installed
native-run : not installed
System:
NodeJS : v12.12.0 (/usr/local/Cellar/node/12.12.0/bin/node)
npm : 6.11.3
OS : macOS Catalina
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Ion-modal not emitting onDidPresent event - Ionic Forum
Hi, I don't know if it's a bug but I can't use @onDidPresent event on ion-modal. I'm using vue-cropperjs to crop images and...
Read more >How to use the Ionic 6 Datetime component - YouTube
In this video we are taking a closer look at the Ionic 6 datetime component and implement a stylish modal that works for...
Read more >5 Examples of the new Ionic 6 Bottom Sheet Modal
Another new component of Ionic 6, and we will talk about that in ... the bottom sheet usually doesn't cover your whole screen,...
Read more >ion-modal: Ionic Mobile App Custom Modal API ... - Heroku
View the Usage section for an example of how to pass a class using cssClass . /* DOES NOT WORK - not specific...
Read more >Ionic 3: Modal Controller - Get component Instance
On submission of feedback , I show a Success Toast and switch my service variable in Service to show next event. Above point...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
fixed in 4.11.9
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.