primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.55k stars 4.61k forks source link

Button icon css class not set after it has been initialized #10277

Closed Kisters-BS closed 3 years ago

Kisters-BS commented 3 years ago

I'm submitting a ...

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)

https://stackblitz.com/edit/github-akgkdp?file=src/app/app.component.html

Current behavior Button with pButton directive and icon does not have css class ".p-button .p-button-icon-left" if the text is set after the button has been initialized without text. With the p-button it works as expected.

Expected behavior The css class for the icon should be added if the button has text.

Minimal reproduction of the problem with instructions Use button with pButton directive and icon. Set Text after it has been initialized.

What is the motivation / use case for changing the behavior? I want to add the text for the button dynamically.

Kisters-BS commented 3 years ago

Thank you very much!

yigitfindikli commented 3 years ago

Thanks for the reporting :) @Kisters-BS