Skip to content

Commit e63bd4f

Browse files
committed
fix(carousel): mark for check when active slide change
1 parent 2bf1ed5 commit e63bd4f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

projects/igniteui-angular/src/lib/carousel/carousel.component.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, ViewChild, TemplateRef } from '@angular/core';
1+
import { Component, ViewChild, TemplateRef, ChangeDetectionStrategy } from '@angular/core';
22
import { TestBed, fakeAsync, tick, waitForAsync } from '@angular/core/testing';
33
import { By } from '@angular/platform-browser';
44
import {
@@ -1174,7 +1174,8 @@ class CarouselTestComponent {
11741174
</igx-carousel>
11751175
`,
11761176
standalone: true,
1177-
imports: [IgxCarouselComponent, IgxSlideComponent]
1177+
imports: [IgxCarouselComponent, IgxSlideComponent],
1178+
changeDetection: ChangeDetectionStrategy.OnPush
11781179
})
11791180
class CarouselAnimationsComponent {
11801181
@ViewChild('carousel', { static: true }) public carousel: IgxCarouselComponent;

projects/igniteui-angular/src/lib/carousel/carousel.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,7 @@ export class IgxCarouselComponent extends IgxCarouselComponentBase implements IC
11051105
}
11061106
this.slideChanged.emit({ carousel: this, slide });
11071107
this.restartInterval();
1108+
this.cdr.markForCheck();
11081109
}
11091110
}
11101111

0 commit comments

Comments
 (0)