-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
#15260: Messages component uses closable
and id
from Message
#15261
Conversation
conditional close and docs update
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
closable
closable
and id
from Message
@@ -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"> |
There was a problem hiding this comment.
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'"> |
There was a problem hiding this comment.
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.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good
Defect Fixes
#15260
<p-messages>
element does not usemsg.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.