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

bug: Cannot set Nav root component in modal with willPresent event #25878

Open
4 of 7 tasks
sean-perkins opened this issue Sep 2, 2022 · 0 comments
Open
4 of 7 tasks
Labels
package: react @ionic/react package type: bug a confirmed bug report

Comments

@sean-perkins
Copy link
Contributor

sean-perkins commented Sep 2, 2022

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

When setting the root component of IonNav inside of a modal, developers are unable to set the root component in the willPresent event callback for the modal.

In both the Angular and Vue framework implementations this is possible.

Expected Behavior

Developers should be able to set the root component in the willPresent event callback, to avoid having a flicker/delayed render of the root component.

Steps to Reproduce

  1. Render IonNav in IonModal
  2. Bind go willPresent event of IonModal
  3. In the event handler, set the root component of the IonNav: nav.current.setRoot(PageOne)
  4. Present the modal
  5. Observe: The root component is not set.

Against reproduction app

  1. Click "Open modal"
  2. Observe: Root component is not set in the modal

Code Reproduction URL

https://stackblitz.com/edit/angular-vmakvy?file=src%2Fmain.tsx

Ionic Info

N/A

Additional Information

No response

@sean-perkins sean-perkins added package: react @ionic/react package type: bug a confirmed bug report labels Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: react @ionic/react package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

1 participant