Skip to content

Commit

Permalink
Merge pull request #337 from siata13/dev
Browse files Browse the repository at this point in the history
Fix bugs: Carousel
  • Loading branch information
estruyf committed Jul 18, 2019
2 parents 9d399f9 + 7ad4d73 commit 0fb2e99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/Carousel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./controls/carousel/index";
6 changes: 1 addition & 5 deletions src/controls/carousel/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ export class Carousel extends React.Component<ICarouselProps, ICarouselState> {
element
}

{
!processing && !element && this.props.children && React.Children.count(this.props.children) > 0 &&
this.props.children[currentIndex]
}
</div>

<div className={this.getMergedStyles(this.getButtonContainerStyles(), containerButtonsStyles)}
Expand Down Expand Up @@ -176,7 +172,7 @@ export class Carousel extends React.Component<ICarouselProps, ICarouselState> {
if (nextButton) {
result = this.props.canMoveNext != undefined ?
!this.props.canMoveNext :
(currentIndex === React.Children.count(this.props.children) - 1) && !isInfinite;
(currentIndex === (this.props.element as JSX.Element[]).length - 1) && !isInfinite;
} else {
result = this.props.canMovePrev != undefined ?
!this.props.canMovePrev :
Expand Down

0 comments on commit 0fb2e99

Please sign in to comment.