-
Notifications
You must be signed in to change notification settings - Fork 13.5k
feat: add ionBreakpointWillChange event #25127
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
Comments
Thanks for the issue. Can you provide a more detailed example of what you are trying to do? A repo that shows the current limitations of the API would be helpful too. |
@liamdebeasi Of course, see a very very small reproduction here: https://github.com/EinfachHans/ionic-modal-breakpoints-example In this case we have this two breakpoints. In the first (default) one you can place instant bids (left button). In the second state you can also enter a custom bid value. There are two ways of opening the second state: 1. Pressing the "Bid" (right) button in the default state. There i call the new method to move the sheet modal. Also i directly update the This would be solved by updating the variable and with it the content before/while the gesture is moving. That's why a |
Hey @EinfachHans, I dug into your reproduction app and looked at a few other app concepts with modal sheets & dynamic contents; I think your other feature request: #23955 may actually be a better solution than this event. The reason for that, is if we introduced My thoughts are we introduce a new option on Based on this analysis, is there any thoughts you have on why the drag events could not solve your use case? |
Hey @sean-perkins , thanks - i really appreciate all the thoughts you put in this and you are right. If the event would everytime include the breakpoint, that the modal would snap to if you would release it at this moment, that would work as well 🤔 |
Awesome, I am going to combine the issues and link out to my comment on that feature request. Thanks! |
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
6.1
is awesome and it's nice that my pr land it in. But the original PR had additional to theionBreakpointDidChange
also aionBreakpointWillChange
event, that was removed. My request would be to add this again and expose it before the gesture of the sheet moving was finished.Describe the Use Case
I show/hide some content within the modal based on the current breakpoint. Like this you can see a small delay when changing the breakpoint by drag.
Describe Preferred Solution
Readd
ionBreakpointWillChange
eventDescribe Alternatives
No response
Related Code
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: