-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Component: Button styleClass #13963
Comments
@nunutu29 Can you please add [size]='small' and check? |
@maruthumj Adding the code I guess the problem affects all those classes:
|
@nunutu29 got it. I have raised PR to fix this issue. |
Hi, I've just created an example to reproduce but it seems styleClass works as usual, could you guide me on what the exact problem is to identify clearly? See the example: https://stackblitz.com/edit/he58hx?file=src%2Fapp%2Fdemo%2Fbutton-sizes-demo.html |
Hi @cetincakiroglu, Using this code, the class <p-button styleClass="p-button-sm" icon="pi pi-pencil"></p-button> See: https://stackblitz.com/edit/he58hx-uvmmqb?file=src%2Fapp%2Fdemo%2Fbutton-sizes-demo.html |
Hi @cetincakiroglu, Thank you |
Any news for this ? We would like to upgrade but this is blocking us to do so. |
Bug fix: #13963 Component: Button styleClass is not being added to the <button>
Correct me if I am wrong, but wasn't this issues supposed to be fixed and restore the previous behaviour of the p-button component? I am upgrading to the latest version and the I went through all breaking changes from 14 until 17 and now I wonder how many other things are there with breaking changes that aren't mentioned. |
It looks like the I checked the button tests and I couldn't see tests verifying the behaviour of the classes. I think it would be nice to have such test. @cetincakiroglu @maruthumj any thoughts and should I open a separate issue? |
Could you please provide a stackblitz example so we can identify the issue? There are 3 major versions and lots of minors between 14 and 17, did you check the changelogs? We've planned in our roadmap to rework tests after the passthrough and unstyled implementation. |
@cetincakiroglu sure, will do as soon as possible. I went through the changelogs between those versions but I mainly focused on the breaking changes sections. I will make another, more thorough, go with the bugfix sections, too. I guess the forementioned issue was not mentioned as a breaking change as it wasn't thought as one after adding the I will get back to you as soon as I create a stackblitz example. Thank you for your quick response. Appreciate it. |
@cetincakiroglu please find the examples here https://stackblitz.com/edit/stackblitz-starters-tqwku2?file=src%2Fmain.ts I added multiple examples with what's expected and what's the outcome in multiple scenarios. I hope it helps. I could've written unit tests but didn't want to spend too much time setting this up, so you'll need to inspect the buttons to see. |
@STotev I can confirm your issue. It might be something with the focus/blur/click event ? |
@nunutu29 nice spot. I was wondering why sometimes my buttons appeared correctly and then break if I, sometimes, hover and sometimes click. |
Thanks a lot for the detailed example, I've addressed this one in #14583 Could you please check after the 17.3.3 release? |
Thank you for the quick fix. Will test it after it comes out and will update you. |
@cetincakiroglu tested in my stackblitz above with 17.3.3 and now all buttons behave as expected. Great work, thank you. |
Is it possible that this error is present in 16.9.12-lts, if so could this be backported to the next 16.9.x LTS version? 🙏 |
Describe the bug
Using version
16.4.1
the following code adds the classp-button-sm
to the inner<button>
element:Result 16.4.1:
After updating to version 16.5.1 this doesn't work/happen anymore:
Result 16.5.1:
I can't find any breaking changes docs except this link: #13851
It also seems that it is relative to primeng classes, because if i add some custom class it works:
Result 16.5.1:
Environment
Angular 16.2.0 + Windows 10 + Chrome (latest)
Reproducer
No response
Angular version
16.2.0
PrimeNG version
16.5.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.18.1
Browser(s)
Chrome (latest)
Steps to reproduce the behavior
No response
Expected behavior
No response
The text was updated successfully, but these errors were encountered: