diff --git a/src/Carousel.ts b/src/Carousel.ts new file mode 100644 index 000000000..e72c02c1a --- /dev/null +++ b/src/Carousel.ts @@ -0,0 +1 @@ +export * from "./controls/carousel/index"; diff --git a/src/controls/carousel/Carousel.tsx b/src/controls/carousel/Carousel.tsx index 2f00e8415..2ba1de2ce 100644 --- a/src/controls/carousel/Carousel.tsx +++ b/src/controls/carousel/Carousel.tsx @@ -83,10 +83,6 @@ export class Carousel extends React.Component { element } - { - !processing && !element && this.props.children && React.Children.count(this.props.children) > 0 && - this.props.children[currentIndex] - }
{ 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 :