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](alert): Call pressed button handler, regardless its 'role' #1

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

joselrio
Copy link
Owner

@joselrio joselrio commented Jan 29, 2024

Issue number: resolves ionic-team#23037


What is the current behavior?

If two buttons in an alert both have the cancel role, only the first handler will ever be called, regardless of which button is pressed.

What is the new behavior?

Now the handler for the pressed button is called, regardless of its 'role'.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Before the fix:
WithoutTheFix

After the fix:
WithTheFix

@joselrio joselrio changed the title [fix](alert): call handler for the pressed button, regardless its 'role' [fix](alert): Call pressed button handler, regardless its 'role' Jan 29, 2024
core/src/components/alert/alert.tsx Outdated Show resolved Hide resolved
core/src/components/alert/alert.tsx Show resolved Hide resolved
Copy link

@rugoncalves rugoncalves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants