Skip to content

Commit 5c1c406

Browse files
author
sagiv.bengiat
committed
resolve #71
1 parent ed13394 commit 5c1c406

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/react-elastic-carousel/components/Carousel.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,16 @@ class Carousel extends React.Component {
4646
itemsToScroll,
4747
breakPoints
4848
} = this.props;
49-
const { firstItem } = this.state;
49+
const { firstItem, sliderContainerWidth } = this.state;
5050
const nextItem = this.getNextItemIndex(firstItem, false);
5151

5252
// update pages (for pagination)
5353
if (
5454
prevProps.children !== children ||
5555
prevProps.itemsToShow !== itemsToShow ||
5656
prevProps.itemsToScroll !== itemsToScroll ||
57-
prevProps.breakPoints !== breakPoints
57+
prevProps.breakPoints !== breakPoints ||
58+
sliderContainerWidth !== prevState.sliderContainerWidth
5859
) {
5960
this.setPages();
6061
}

0 commit comments

Comments
 (0)