Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c8a4686

Browse filesBrowse files
committed
fix(carousel): interval prop value change should set/reset timer, closes #214 - thanks @baloo32
1 parent ba6864a commit c8a4686
Copy full SHA for c8a4686

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed

‎projects/coreui-angular/src/lib/carousel/carousel/carousel.component.ts

Copy file name to clipboardExpand all lines: projects/coreui-angular/src/lib/carousel/carousel/carousel.component.ts
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
AfterContentInit,
33
Component,
44
DestroyRef,
5+
effect,
56
ElementRef,
67
Inject,
78
inject,
@@ -98,6 +99,10 @@ export class CarouselComponent implements OnInit, OnDestroy, AfterContentInit {
9899
computation: (value: number) => value
99100
});
100101

102+
readonly #intervalEffect = effect(() => {
103+
this.interval() ? this.setTimer() : this.resetTimer();
104+
});
105+
101106
/**
102107
* Sets which event handlers you’d like provided to your pause prop. You can specify one trigger or an array of them.
103108
* @return {'hover' | 'focus' | 'click'}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.