Skip to content

Commit bf397d2

Browse files
committed
fix(accordion): accordion item not expanded when visible=true on init (regression)
1 parent 75cedd5 commit bf397d2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

projects/coreui-angular/src/lib/accordion/accordion-item/accordion-item.component.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class AccordionItemComponent implements OnInit, OnDestroy {
3333

3434
/**
3535
* Toggle an accordion item programmatically
36-
* @type boolean
36+
* @return boolean
3737
* @default false
3838
*/
3939
// eslint-disable-next-line @angular-eslint/no-input-rename
@@ -42,9 +42,7 @@ export class AccordionItemComponent implements OnInit, OnDestroy {
4242
readonly itemVisible = signal(false);
4343

4444
readonly #visibleInputChange = effect(() => {
45-
setTimeout(() => {
46-
this.itemVisible.set(this.visibleInput());
47-
});
45+
this.visible = this.visibleInput();
4846
});
4947

5048
set visible(value: boolean) {

0 commit comments

Comments
 (0)