Skip to content

Commit d887757

Browse files
Merge pull request #15470 from IgniteUI/rivanova/fix-15469-master
fix(carousel): mark for check when active slide change - master
2 parents 10d7ede + 7565301 commit d887757

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 {
@@ -1143,7 +1143,8 @@ class CarouselTestComponent {
11431143
<igx-slide><h3>Slide4</h3></igx-slide>
11441144
</igx-carousel>
11451145
`,
1146-
imports: [IgxCarouselComponent, IgxSlideComponent]
1146+
imports: [IgxCarouselComponent, IgxSlideComponent],
1147+
changeDetection: ChangeDetectionStrategy.OnPush
11471148
})
11481149
class CarouselAnimationsComponent {
11491150
@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
@@ -1048,6 +1048,7 @@ export class IgxCarouselComponent extends IgxCarouselComponentBase implements On
10481048
}
10491049
this.slideChanged.emit({ carousel: this, slide });
10501050
this.restartInterval();
1051+
this.cdr.markForCheck();
10511052
}
10521053
}
10531054

0 commit comments

Comments
 (0)