From 25afa0a6dbf1d0acf8b8fbb2f9df3bf3209d981c Mon Sep 17 00:00:00 2001 From: Pavel Tropin Date: Wed, 14 Feb 2024 12:58:48 +0100 Subject: [PATCH] fix(kit): scroll over carousel items --- projects/kit/components/carousel/carousel.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/kit/components/carousel/carousel.component.ts b/projects/kit/components/carousel/carousel.component.ts index 303d1a6084eb..2941f3891ca1 100644 --- a/projects/kit/components/carousel/carousel.component.ts +++ b/projects/kit/components/carousel/carousel.component.ts @@ -86,6 +86,10 @@ export class TuiCarouselComponent { } next(): void { + if (this.items && this.index === this.items.length - this.itemsCount) { + return; + } + this.updateIndex(this.index + 1); }