Skip to content

Commit

Permalink
Fixed #16064 - Button | Add focus() method
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Jul 19, 2024
1 parent 98f9682 commit 28461f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/components/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,10 @@ export class Button implements AfterContentInit {
'p-badge-no-gutter': this.badge && String(this.badge).length === 1
};
}

focus() {
this.el.nativeElement.firstChild.focus();
}
}

@NgModule({
Expand Down

0 comments on commit 28461f5

Please sign in to comment.