Skip to content
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

Toast | Position Class is there twice when using Angular SSR and Client Hydration #13784

Closed
EnricoMessall opened this issue Sep 30, 2023 · 0 comments · Fixed by #13785
Closed
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@EnricoMessall
Copy link
Contributor

EnricoMessall commented Sep 30, 2023

Describe the bug

When using SSR with Client Hydration the position class is in there twice since SSR already added the class to the dom when building the routes. Then the client code injects into it and is no longer knowing that the first class is provided by the toast component and just adds the current position to the classes again. That results in:
Screenshot 2023-09-30 at 00 54 06

To fix that all normal classes should be provided in the normal class tag, also I added Change Detection to position to be sure that everything will be updated.

Environment

Reproducer

No response

Angular version

16.2.3

PrimeNG version

16.4.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.5.1

Browser(s)

Chrome, Safari

Steps to reproduce the behavior

No response

Expected behavior

No response

@EnricoMessall EnricoMessall added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 30, 2023
EnricoMessall added a commit to Arematics/primeng that referenced this issue Sep 30, 2023
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 8, 2023
@cetincakiroglu cetincakiroglu added this to the 16.8.0 milestone Nov 8, 2023
cetincakiroglu added a commit that referenced this issue Nov 8, 2023
Fixed #13784 - Fixed toast ngClass with SSR and Hydration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants