Skip to content

Commit 0fb2e99

Browse files
authored
Merge pull request #337 from siata13/dev
Fix bugs: Carousel
2 parents 9d399f9 + 7ad4d73 commit 0fb2e99

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/Carousel.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./controls/carousel/index";

src/controls/carousel/Carousel.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ export class Carousel extends React.Component<ICarouselProps, ICarouselState> {
8383
element
8484
}
8585

86-
{
87-
!processing && !element && this.props.children && React.Children.count(this.props.children) > 0 &&
88-
this.props.children[currentIndex]
89-
}
9086
</div>
9187

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

0 commit comments

Comments
 (0)