Skip to content

Commit

Permalink
Merge pull request #29 from navedqb/fix--15859
Browse files Browse the repository at this point in the history
fix: toggle accordion on header text/icon click
  • Loading branch information
navedqb authored Jun 20, 2024
2 parents 1a7c2cf + 13c8539 commit 492cb4e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/app/components/accordion/accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,7 @@ export class AccordionTab implements AfterContentInit, OnDestroy {
}

toggle(event?: MouseEvent | KeyboardEvent) {
const target = event.target as HTMLElement;

if (this.disabled || !(target.tagName.toLowerCase() === 'a' && target.classList.contains('p-accordion-header-link'))) {
if (this.disabled) {
return false;
}

Expand Down

0 comments on commit 492cb4e

Please sign in to comment.