pButton | Loading icon problem #13901
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
For buttons with the directive
![pbutton](https://private-user-images.githubusercontent.com/25552695/275847594-6384ea5f-18f6-48ec-b353-5c2a729a551a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzQ4NTAsIm5iZiI6MTczOTUzNDU1MCwicGF0aCI6Ii8yNTU1MjY5NS8yNzU4NDc1OTQtNjM4NGVhNWYtMThmNi00OGVjLWIzNTMtNWMyYTcyOWE1NTFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDEyMDIzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYyMDcyODlkODFmNTU4MGFiNDJlZmZkNDE5ZjMyNWIzZTljZmVmMDAyOTkyMDZjY2VhMTE4OGJhYmE2NDJmYjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1YHvl1kwqH94yw9l52loIcw5MpHiv_bD4dDaejvpDjg)
pButton
, when the loading property changes and the loading icon is removed, an empty element take its place. This element has a margin that gives the button an empty space next to the label where the loading icon was:Environment
Windows
Reproducer
https://stackblitz.com/edit/gmhqyu-xzl3yd?file=src%2Fapp%2Fdemo%2Fbutton-loading-demo.html
Angular version
16.X
PrimeNG version
16.5.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.16
Browser(s)
No response
Steps to reproduce the behavior
pButton
now has additional spacing where the loading icon was. Furthermore, the remainingspan
has a css class named:.undefined'
Expected behavior
When the icon is removed, the
span
containing it should be removed as well.The text was updated successfully, but these errors were encountered: