Skip to content

Commit a7f001a

Browse files
authored
Update how isLast is set when data is updated (#330)
* Update how isLast is set when data is updated Check if the current slide should be the last slide when dataStream is updated. This fixes an issue where the dataStream is updated but the carousel slides do not move. In the current state, isLast will incorrectly be set to false. With these changes, isLast will stay false if the carousel is still on the last slide after the data updates Co-authored-by: Rehan Alam <[email protected]>
1 parent d77197d commit a7f001a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/ngu-carousel/src/lib/ngu-carousel/ngu-carousel.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export class NguCarousel<T> extends NguCarouselStore
196196
.pipe(takeUntil(this._intervalController$))
197197
.subscribe(data => {
198198
this.renderNodeChanges(data);
199-
this.isLast = false;
199+
this.isLast = this.pointIndex === this.currentSlide;
200200
});
201201
}
202202
}

0 commit comments

Comments
 (0)