feat: Add support to lock sheet modal height at set breakpoint
See original GitHub issuePrerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
The sheet modal currently allows setting a new breakpoint after it has been presented, but this cannot be locked in place and the sheet will grow in height if the user attempts to scroll a list or date (month view). This feature request is to suggest adding a method to HTMLIonModalElement
that enables/disables changing modal breakpoint.
Describe the Use Case
When attempting to scroll through a child element like ion-datetime
in month-year
presentation,
Describe Preferred Solution
Add a HTMLIonModalElement.lockBreakpoint(boolean?)
that enables/disables breakpoint height changes
Describe Alternatives
No response
Related Code
async showTimelist() {
if (this.rangeType === 'custom') {
const modal = await this.modalCtrl.getTop();
modal.setCurrentBreakpoint(1);
modal.lockBreakpoint(true);
}
}
async onDateClick() {
const modal = await this.modalCtrl.getTop();
modal.lockBreakpoint();
}
async onDateBlur() {
const modal = await this.modalCtrl.getTop();
modal.lockBreakpoint(false);
}
Additional Information
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
feat: Add support to lock sheet modal height at set breakpoint ...
The sheet modal currently allows setting a new breakpoint after it has been presented, but this cannot be locked in place and the...
Read more >How to limit the height of the modal? - Stack Overflow
Use viewport units with calc . Like this: .img-responsive { max-height: calc(100vh - 225px); } ...where the 225px corresponds to the combined height...
Read more >August 2021 (version 1.60) - Visual Studio Code
Locked editor group preview - Keep a preferred editor layout by locking the editor group. Python extension testing updates - Better support for...
Read more >Atmel Studio 7 User Guide - Microchip Technology
Atmel Studio provides a project management tool, source file editor, simulator, assembler, and front-end for C/C++, programming, and on-chip ...
Read more >Bootstrap Modal Sizing - free examples & tutorial
Modal width, modal height, fullscreen modal, large modal with lg & xl modal ... These sizes kick in at certain breakpoints to avoid...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks! As noted in https://github.com/ionic-team/ionic-framework/issues/25641#issuecomment-1189021271 this would be solved by https://github.com/ionic-team/ionic-framework/issues/24631. Please follow that thread for updates on this feature.
Duplicate of #24631 i guess? 😊