(v19) Default styles showing before custom styles with transition
Describe the bug
I started using PrimeNG v19 with a new way to customize components and ran into this problem: I created my own preset to customize the button component by setting parameters like color, background, etc., and added
Pull Request Link
No response
Reason for not contributing a PR
- [ ] Lack of time
- [X] Unsure how to implement the fix/feature
- [ ] Difficulty understanding the codebase
- [ ] Other
Other Reason
No response
Reproducer
https://stackblitz.com/edit/stackblitz-starters-rb9xgw9x
Environment
Windows 24H2
Angular version
19.0.0
PrimeNG version
v19
Node version
22.12.0
Browser(s)
Google Chrome
Steps to reproduce the behavior
- Click on page2
- Return to the page1
- The default button style is applied first, and then my custom styles are applied with a transition.
Expected behavior
- Click on page2
- Return to the page1
- My custom styles are applied without a transition.
This is related to transition. Please try;
button: {
transitionDuration: 0,
colorScheme: {
...
https://stackblitz.com/edit/stackblitz-starters-5n4px7fv?file=src%2Fapp%2Fapp.config.ts%3AL745
Best Regards,
This is related to
transition. Please try;button: { transitionDuration: 0, colorScheme: { ... https://stackblitz.com/edit/stackblitz-starters-5n4px7fv?file=src%2Fapp%2Fapp.config.ts%3AL745
Best Regards,
That's not fixing the problem it's just turning off all button transitions. I have a similar issue with text buttons initially showing a border that then fades to transparent. That's happening on inital page load as well as on route changes. And also not related to customized buttons. It's the same when using Aura preset.
Did anyone find a solution for this? We have the same issue on v20.
https://stackblitz.com/edit/dszabo-primeng-transition-issue?file=src%2Fapp%2Fapp.ts
https://github.com/user-attachments/assets/df360d4b-1bc2-41d6-9568-8f51a7c4b648
hi, i am quite new to primeng and angular in general. i am facing a similar situation for the drag effects, after overriding my opacity properties for the drag element it wont reflect. the transitions styles puts the opacity dynamically and sometimes the opacity is not even same. any help will be appriciated.
I'm using Angular 20V and I'm also facing the same problem. Has any valid solution been found?