File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,7 +97,6 @@ export class CarouselComponent implements OnInit {
9797 */
9898 carouselItems$ : BehaviorSubject < ItemSearchResult [ ] > = new BehaviorSubject < ItemSearchResult [ ] > ( [ ] ) ;
9999
100-
101100 private paginationOptionId : string ;
102101
103102 private pageSize = 5 ;
@@ -168,6 +167,10 @@ export class CarouselComponent implements OnInit {
168167
169168 if ( ! this . pageToBitstreamsMap . get ( currentPage + 1 ) && currentSlideIndex + this . slideLoadingBuffer === currentPage * this . pageSize ) {
170169 this . loadNextPageBitstreams ( ) ;
170+ } else if ( slideEvent . source === 'indicator' && currentSlideIndex > this . pageSize * this . currentSliderPage ) {
171+ this . isLoading$ . next ( true ) ;
172+ this . currentSliderPage = currentPage ;
173+ this . loadNextPageBitstreams ( ) ;
171174 }
172175 }
173176
@@ -257,6 +260,7 @@ export class CarouselComponent implements OnInit {
257260 if ( isNotEmpty ( itemToImageHrefMap ) ) {
258261 this . itemToImageHrefMap$ . next ( new Map ( [ ...Array . from ( this . itemToImageHrefMap$ . value . entries ( ) ) , ...Array . from ( itemToImageHrefMap . entries ( ) ) ] ) ) ;
259262 }
263+ this . isLoading$ . next ( false ) ;
260264 } ) ) ;
261265
262266 }
You can’t perform that action at this time.
0 commit comments