Skip to content

Commit

Permalink
Merge pull request #15989 from primefaces/issue-15946
Browse files Browse the repository at this point in the history
Fixed #15946 - ButtonComponent: routerLink accessible even when butto…
  • Loading branch information
cetincakiroglu authored Jul 11, 2024
2 parents 06ae38b + 11df3e9 commit d6f7e51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/components/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ export class ButtonDirective implements AfterViewInit, OnDestroy {
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
host: {
class: 'p-element'
class: 'p-element',
'[class.p-disabled]': 'disabled' || 'loading'
}
})
export class Button implements AfterContentInit {
Expand Down Expand Up @@ -521,7 +522,6 @@ export class Button implements AfterContentInit {
'p-button p-component': true,
'p-button-icon-only': (this.icon || this.iconTemplate || this.loadingIcon || this.loadingIconTemplate) && !this.label,
'p-button-vertical': (this.iconPos === 'top' || this.iconPos === 'bottom') && this.label,
'p-disabled': this.disabled || this.loading,
'p-button-loading': this.loading,
'p-button-loading-label-only': this.loading && !this.icon && this.label && !this.loadingIcon && this.iconPos === 'left',
'p-button-link': this.link,
Expand Down

0 comments on commit d6f7e51

Please sign in to comment.