updateAutoHeight() with a specific transition end value #6457
Replies: 1 comment 1 reply
-
Yes, I'm having this issue too. Did you solve this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey guys
I am using some quite complex and animated elements inside the swiper slides (e.g. accordions that will change its height when clicked).
The swiper uses the options
autoHeight: true
andeffect: 'slide'
which make sure that the height of the swiper container is andjusted when switching between slides. ButautoHeight
has no effect when the height of the content inside a slide changes. This means that content is going to overflow the slide element.I am aware that there is a method
swiper.updateAutoHeight(speed)
. But this method calculates the current height of the content and then adjusts the swiper height in an animated manner. So when I call this function before the accordion opens, nothing happens. But I can't call it after the accordion opens because it is animated and i do not want the content of the slide to overflow it's container.As far as I can tell, a solution would be something like this:
TLDR: how can I force swiper to update and animate its autoHeight to a specific height value?
Has anyone else run into this problem?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions