Skip to content

Commit

Permalink
Merge pull request #13676 from TheWrightDev/patch-1
Browse files Browse the repository at this point in the history
Fix button loading issue #13489
  • Loading branch information
cetincakiroglu authored Sep 22, 2023
2 parents 235cc49 + 4f8971f commit 0bf5750
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/app/components/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,10 @@ export class ButtonDirective implements AfterViewInit, OnDestroy {
let iconElement = DomHandler.findSingle(this.htmlElement, '.p-button-icon');
let labelElement = DomHandler.findSingle(this.htmlElement, '.p-button-label');

if (!this.icon && !this.loading) {
iconElement && this.htmlElement.removeChild(iconElement);
return;
}

if (this.loading && !this.loadingIcon && iconElement) {
iconElement.innerHTML = this.spinnerIcon;
} else if (iconElement?.innerHTML) {
iconElement.innerHTML = '';
}

if (iconElement) {
Expand Down

1 comment on commit 0bf5750

@vercel
Copy link

@vercel vercel bot commented on 0bf5750 Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.