Skip to content

Commit 246da2e

Browse files
Merge pull request #15471 from IgniteUI/rivanova/fix-15469-19.1.x
fix(carousel): mark for check when active slide change - 19.1.x
2 parents 99f71de + dfdbfa1 commit 246da2e

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 {
@@ -1172,7 +1172,8 @@ class CarouselTestComponent {
11721172
<igx-slide><h3>Slide4</h3></igx-slide>
11731173
</igx-carousel>
11741174
`,
1175-
imports: [IgxCarouselComponent, IgxSlideComponent]
1175+
imports: [IgxCarouselComponent, IgxSlideComponent],
1176+
changeDetection: ChangeDetectionStrategy.OnPush
11761177
})
11771178
class CarouselAnimationsComponent {
11781179
@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
@@ -1115,6 +1115,7 @@ export class IgxCarouselComponent extends IgxCarouselComponentBase implements IC
11151115
}
11161116
this.slideChanged.emit({ carousel: this, slide });
11171117
this.restartInterval();
1118+
this.cdr.markForCheck();
11181119
}
11191120
}
11201121

0 commit comments

Comments
 (0)