Closed RickRosendaal closed 4 months ago
Ensures the slides data gets updated when the window resizes to avoid the minSlideIndex and maxSlideIndex to be outdated when itemsToShow is overridden for a breakpoint.
minSlideIndex
maxSlideIndex
itemsToShow
Reproduceable example:
<Carousel snap-align="center" :items-to-show="1" :breakpoints="{ 1024: { itemsToShow: 2, snapAlign: 'start', }, }" > <!-- Insert 3 slides --> </Carousel>
Note how the maxSlideIndex doesn't get adjusted from 2 to 1 when increasing the window size to above 1024px.
2
1
After this fix, the maxSlideIndex will be adjusted accordingly.
Ensures the slides data gets updated when the window resizes to avoid the
minSlideIndex
andmaxSlideIndex
to be outdated whenitemsToShow
is overridden for a breakpoint.Reproduceable example:
Note how the
maxSlideIndex
doesn't get adjusted from2
to1
when increasing the window size to above 1024px.After this fix, the
maxSlideIndex
will be adjusted accordingly.