Skip to content

Commit

Permalink
fix initialSlideWidth for Carousel prop in Grid
Browse files Browse the repository at this point in the history
  • Loading branch information
pingan1927 committed Feb 24, 2017
1 parent 5550f66 commit 1a897c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/carousel/PropsType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface Props {
onScrollBeginDrag?: Function;
onMomentumScrollEnd?: Function;
styles?: any;
initialSlideWidth?: number;
}

export default Props;
2 changes: 1 addition & 1 deletion components/grid/index.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default class Grid extends React.Component<GridProps, any> {
[className as string]: className,
})}
>
{isCarousel && pageCount > 1 ? <Carousel>{pagesArr}</Carousel> : rowsArr}
{isCarousel && pageCount > 1 ? <Carousel initialSlideWidth={this.clientWidth}>{pagesArr}</Carousel> : rowsArr}
</div>
);
}
Expand Down

0 comments on commit 1a897c4

Please sign in to comment.