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

#15260: Messages component uses closable and id from Message #15261

Merged
merged 3 commits into from
Apr 18, 2024

Conversation

jacver
Copy link
Contributor

@jacver jacver commented Apr 11, 2024

Defect Fixes

#15260

<p-messages> element does not use msg.closable in the *ngIf. This means that when adding multiple messages to the service, you cannot have some closable and others not closable.

This PR adds the logic and updates the documentation to fix this and allow the ID attribute to be set from the Message object.

conditional close and docs update
Copy link

vercel bot commented Apr 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview Apr 12, 2024 1:20pm

@jacver jacver requested a review from rosenthalj April 12, 2024 13:22
@jacver jacver changed the title #15260: Messages component uses closable #15260: Messages component uses closable and id from Message Apr 12, 2024
@@ -42,7 +42,7 @@ import { Subscription, timer } from 'rxjs';
role="alert"
[@messageAnimation]="{ value: 'visible', params: { showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions } }"
>
<div class="p-message-wrapper" [attr.data-pc-section]="'wrapper'">
<div class="p-message-wrapper" [attr.data-pc-section]="'wrapper'" [attr.id]="msg.id || null">
Copy link
Contributor

@rosenthalj rosenthalj Apr 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, but this addresses a different issue

@@ -60,7 +60,7 @@ import { Subscription, timer } from 'rxjs';
<span *ngIf="msg.summary" class="p-message-summary" [attr.data-pc-section]="'summary'">{{ msg.summary }}</span>
<span *ngIf="msg.detail" class="p-message-detail" [attr.data-pc-section]="'detail'">{{ msg.detail }}</span>
</ng-template>
<button class="p-message-close p-link" (click)="removeMessage(i)" *ngIf="closable" type="button" pRipple [attr.aria-label]="closeAriaLabel" [attr.data-pc-section]="'closebutton'">
<button class="p-message-close p-link" (click)="removeMessage(i)" *ngIf="closable && (msg.closable ?? true)" type="button" pRipple [attr.aria-label]="closeAriaLabel" [attr.data-pc-section]="'closebutton'">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -1313,7 +1313,7 @@
"values": [
{
"name": "Message",
"description": "Deines valid options for the message.",
"description": "Defines valid options for the message.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@cetincakiroglu cetincakiroglu modified the milestone: 17.14.0 Apr 18, 2024
@cetincakiroglu cetincakiroglu merged commit 0038037 into primefaces:master Apr 18, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants