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

fix(react): avoid multiple invocations of onDidDismiss and onWillPresent #28020

Merged
merged 2 commits into from
Aug 22, 2023

Conversation

sean-perkins
Copy link
Contributor

@sean-perkins sean-perkins commented Aug 17, 2023

Issue number: Resolves #28010


What is the current behavior?

onDidDismiss and onWillPresent will fire twice when having a manual binding in your implementation for inline overlays.

e.g.:

<IonAlert onDidDismiss={() => console.log('hello world')} />

Will result in:

hello world
hello world

What is the new behavior?

  • onDidDismiss and onWillPresent do not execute the callback handler twice per invocation

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dev-build: 7.3.1-dev.11692305436.16a4008f

@stackblitz
Copy link

stackblitz bot commented Aug 17, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions bot added the package: react @ionic/react package label Aug 17, 2023
@sean-perkins sean-perkins marked this pull request as ready for review August 21, 2023 20:21
@sean-perkins sean-perkins added this pull request to the merge queue Aug 22, 2023
Merged via the queue into main with commit 0ac3df3 Aug 22, 2023
@sean-perkins sean-perkins deleted the sp/FW-4989 branch August 22, 2023 14:43
aeharding added a commit to aeharding/voyager that referenced this pull request Oct 8, 2023
aeharding added a commit to aeharding/voyager that referenced this pull request Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: react @ionic/react package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: IonAlert onDidDismiss and onWillPresent fires twice
2 participants