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

feat: Alert handler should support a Promise #25700

Closed
3 tasks done
sean-perkins opened this issue Aug 1, 2022 · 4 comments · Fixed by #25702
Closed
3 tasks done

feat: Alert handler should support a Promise #25700

sean-perkins opened this issue Aug 1, 2022 · 4 comments · Fixed by #25702
Labels
package: core @ionic/core package type: feature request a new feature, enhancement, or improvement

Comments

@sean-perkins
Copy link
Contributor

Prerequisites

Describe the Feature Request

Many of the existing overlays already support a Promise to be used with the handler to control when the overlay dismisses. This is not available to ion-alert.

This feature request is to add support to ion-alert to allow for a promise.

Describe the Use Case

Performing an action in the handler callback that requires asynchronous behavior (performing an API call, waiting for user input, waiting a set duration).

Describe Preferred Solution

handler: async() => {
  const res = await this.someService.method(); // res returns `true` or `false` controlling if the alert dismisses 
  return res;
}

Describe Alternatives

No response

Related Code

No response

Additional Information

Split from PR #22518

@ionitron-bot ionitron-bot bot added the triage label Aug 1, 2022
@sean-perkins sean-perkins added type: feature request a new feature, enhancement, or improvement package: core @ionic/core package labels Aug 1, 2022
@ionitron-bot ionitron-bot bot removed the triage label Aug 1, 2022
@sean-perkins sean-perkins added the help wanted a good issue for the community label Aug 1, 2022
@ionitron-bot
Copy link

ionitron-bot bot commented Aug 1, 2022

This issue has been labeled as help wanted. This label is added to issues that we believe would be good for contributors.

If you'd like to work on this issue, please comment here letting us know that you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort.

For a guide on how to create a pull request and test this project locally to see your changes, see our contributing documentation.

Thank you!

sean-perkins added a commit that referenced this issue Aug 3, 2022
@sean-perkins sean-perkins removed the help wanted a good issue for the community label Aug 3, 2022
@sean-perkins
Copy link
Contributor Author

This feature is completed and will be available in 6.3.0. This feature request will auto close once it is merged and released. Thanks Hans for the assist!

@liamdebeasi
Copy link
Contributor

Closing as it is completed via #25702. Only PRs that get merged into the default branch cause issues to autoclose it seems.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 14, 2022

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: feature request a new feature, enhancement, or improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants