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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/app/components/messages/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ import { Subscription, timer } from 'rxjs';
</ng-container>
<ng-template #escapeOut>
<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>
<span *ngIf="msg.detail" class="p-message-detail" [attr.data-pc-section]="'detail'">{{ msg.detail }} test</span>
jacver marked this conversation as resolved.
Show resolved Hide resolved
</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="msg.closable || (closable && msg.closable)" type="button" pRipple [attr.aria-label]="closeAriaLabel" [attr.data-pc-section]="'closebutton'">
jacver marked this conversation as resolved.
Show resolved Hide resolved
<TimesIcon [styleClass]="'p-message-close-icon'" [attr.data-pc-section]="'closeicon'" />
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/apidoc/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -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

"props": [
{
"name": "severity",
Expand Down
8 changes: 4 additions & 4 deletions src/app/showcase/doc/messages/servicedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export class ServiceDoc {

addMultiple() {
this.messageService.addAll([
{ severity: 'success', summary: 'Service Message', detail: 'Via MessageService' },
{ severity: 'info', summary: 'Info Message', detail: 'Via MessageService' }
{ severity: 'success', summary: 'Service Message', detail: 'Via MessageService', closable: true },
jacver marked this conversation as resolved.
Show resolved Hide resolved
{ severity: 'info', summary: 'Info Message', detail: 'Via MessageService', closable: false }
jacver marked this conversation as resolved.
Show resolved Hide resolved
]);
}

Expand Down Expand Up @@ -75,8 +75,8 @@ export class MessagesServiceDemo {

addMultiple() {
this.messageService.addAll([
{severity:'success', summary:'Service Message', detail:'Via MessageService'},
{severity:'info', summary:'Info Message', detail:'Via MessageService'}
{ severity: 'success', summary: 'Service Message', detail: 'Via MessageService', closable: true },
jacver marked this conversation as resolved.
Show resolved Hide resolved
{ severity: 'info', summary: 'Info Message', detail: 'Via MessageService', closable: false }
jacver marked this conversation as resolved.
Show resolved Hide resolved
]);
}

Expand Down
Loading