Skip to content

Commit

Permalink
Update slides data on window resize
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
RickRosendaal authored Dec 5, 2023
1 parent b8367cd commit f091d30
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Carousel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export default defineComponent({

const handleWindowResize = debounce(() => {
updateBreakpointsConfigs()
updateSlidesData()
updateSlideWidth()
}, 16)

Expand Down

0 comments on commit f091d30

Please sign in to comment.