Skip to content

Commit 8f6a3d9

Browse files
committed
fix(offcanvas): nextId
1 parent 9497536 commit 8f6a3d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/coreui-angular/src/lib/offcanvas/offcanvas/offcanvas.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { OffcanvasService } from '../offcanvas.service';
2222
import { BackdropService } from '../../backdrop/backdrop.service';
2323
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
2424

25-
const nextId = 0;
25+
let nextId = 0;
2626

2727
@Component({
2828
selector: 'c-offcanvas',
@@ -94,7 +94,7 @@ export class OffcanvasComponent implements OnChanges, OnInit, OnDestroy {
9494
}
9595
private _scroll = false;
9696

97-
@Input() id = `offcanvas-${this.placement}-${nextId}`;
97+
@Input() id = `offcanvas-${this.placement}-${nextId++}`;
9898
/**
9999
* Default role for offcanvas. [docs]
100100
* @type string

0 commit comments

Comments
 (0)