Skip to content

Commit

Permalink
Don't show breadcrumb button without any label #9432
Browse files Browse the repository at this point in the history
With MDC this would take up empty space, breaking layout, while not
showing anything to end-user, so being useless.
  • Loading branch information
PowerKiKi committed Mar 20, 2023
1 parent bdd6a21 commit f655ca5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<div class="breadcrumb">
<a [routerLink]="isPanel ? [] : getRootLink()" [fragment]="listFragment" color="primary" mat-button>{{
rootLabel || label
}}</a>
<a
*ngIf="rootLabel || label"
[routerLink]="isPanel ? [] : getRootLink()"
[fragment]="listFragment"
color="primary"
mat-button
>{{ rootLabel || label }}</a
>
<ng-container *ngFor="let parent of breadcrumbs">
/
<a [routerLink]="isPanel ? [] : getLink(parent.id)" color="primary" mat-button>
Expand Down
5 changes: 5 additions & 0 deletions src/app/detail-header/detail-header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,9 @@ <h2 class="mat-h2">All</h2>
</div>
</natural-detail-header>
</div>
<div>
<h2 class="mat-h2">Minimal</h2>

<natural-detail-header [model]="model"> </natural-detail-header>
</div>
</div>

0 comments on commit f655ca5

Please sign in to comment.