question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: React IonModal component doesn't support documented events

See original GitHub issue

Bug 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.

Relevant code here and here.

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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
elylucascommented, Jan 23, 2020

fixed in 4.11.9

0reactions
ionitron-bot[bot]commented, Feb 22, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found