Button icon css class not set after it has been initialized #10277
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
I'm submitting a ...
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.
Angular version: 11.0.0
PrimeNG version: 11.3.0
Browser: [Chrome 91 | Firefox 88 | Edge 90]
Language: TypeScript 4.0.2
The text was updated successfully, but these errors were encountered: