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

Show message summary and detail only when they have value #3778

Closed
negberts opened this issue Aug 29, 2017 · 0 comments
Closed

Show message summary and detail only when they have value #3778

negberts opened this issue Aug 29, 2017 · 0 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@negberts
Copy link

negberts commented Aug 29, 2017

I'm submitting a ... (check one with "x")

[ ] bug report => Search github for a similar issue or PR before submitting
[X] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
Summary and detail are always rendered for messages, even when they are null or empty.

<li *ngFor="let msg of value">
                    <span class="ui-messages-summary" [innerHTML]="msg.summary"></span>
                    <span class="ui-messages-detail" [innerHTML]="msg.detail"></span>
</li>

Expected behavior

<li *ngFor="let msg of value">
                    <span *ngIf="msg.summary" class="ui-messages-summary" [innerHTML]="msg.summary"></span>
                    <span *ngIf="msg.detail"  class="ui-messages-detail" [innerHTML]="msg.detail"></span>
</li>

Because of the css-classes, even without a summary the messages are shown with a left-margin for instance.

  • PrimeNG version: 4.2.0-rc1
@cagataycivici cagataycivici self-assigned this Oct 20, 2017
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Oct 20, 2017
@cagataycivici cagataycivici added this to the 4.2.3 milestone Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants