-
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
ion-slides (Swiper) autoHeight option doesn't adjust the container height to active slide #15079
Comments
This issue has been automatically identified as an Ionic 3 issue. We recently moved Ionic 3 to its own repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there. If I've made a mistake, and if this issue is still relevant to Ionic 4, please let the Ionic Framework team know! Thank you for using Ionic! |
Issue moved to: ionic-team/ionic-v3#661 |
The PR #16712 is ready to go and now exposes the Swiper instance's updateAutoHeight() method to allow for programmatically forcing the swiper container to update the height for the active slide when using the autoHeight = true option with your ion-slides. |
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. |
Ionic version: (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[ ] 3.x
[x] 4.x
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
Current behavior:
If you use the ion-slides component with autoHeight option set to true, it doesn't adjust the ion-slides height to the active slide's content height as it supposed to.
Expected behavior:
The container should adjust to the content height of the active slide: http://idangero.us/swiper/demos/390-autoheight.html
Related code:
Other information:
The ion-slide element (and .swiper-slide class) having a height of auto instead of 100% seems to fix the issue.
This style definition which should provide the desired effect is not getting through the shadow DOM of this implementation.
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):The text was updated successfully, but these errors were encountered: