-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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: Ion-select should bubble up and emit the child overlay's events #24199
Comments
Thanks for the issue. I think having
|
This would be possible and acceptable, but unfortunately the alert component doesn't seem to emit it's events to window in my testing. |
Ah interesting. Are you able to reproduce that in an Ionic starter app? I am testing the events on my end, and the alert events are bubbling up to the window. |
I cannot reproduce this with an Ionic starter app in Vue. I created a new one and tested it with the alertController. I did not try the ion-select component in my test - I wanted to see if the alert component alone could bubble up to window. FWIW, my package dependencies in the test starter app are: |
Sample Code.zip |
Oh can you try listening for |
You are correct, kebab case ("ion-alert-will-present") does bubble up to window in both my starter app and my actual application. |
For posterity, I was able to solve my problem this by using the following code (works if you're using the alert presentation for ion-select):
Thanks for your prompt help! |
Glad it works! I can look into updating the docs so this event name change is clearer. Going to close this out since it sounds like the initial issue is resolved. Thanks again! |
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. |
Prerequisites
Describe the Feature Request
It would make a lot of sense for ion-select to also support it's own child overlay’s events as they fire. Since the overlay is either an alert, action sheet or popover, it’d be great if we could still take advantage of those events while using , such as the alert’s ionAlertWillPresent event.
Describe the Use Case
I currently need to ensure that the ion-alert window, used inside the ion-select component, is scrolled to the selected item when it's opened. Since Ionic has not yet natively supported this, I would like to do it using the ion-alert event ionAlertWillPresent.
Describe Preferred Solution
You'd be able to subscribe to these events as if they belonged to the ion-select component itself. To do this, the ion-select component simply needs to listen for these events and re-emit them with the same arguments.
Describe Alternatives
No response
Related Code
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: