Skip to content

Commit

Permalink
fix(core/forms): hide image preview in read only mode w/ null value
Browse files Browse the repository at this point in the history
  • Loading branch information
trik committed Jun 3, 2020
1 parent 91c09a6 commit f645e0b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/forms/read-only-image-field.html
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
<img [src]="imageUrl|async">
<img *ngIf="imageUrl|async as iu ; else noImage" [src]="imageUrl|async">
<ng-template #noImage>
<div class="ajf-no-image-placeholder"></div>
</ng-template>
7 changes: 7 additions & 0 deletions src/core/forms/read-only-image-field.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ajf-read-only-image-field {
.ajf-no-image-placeholder {
width: 100%;
height: 32px;
background-color: #eeeeee;
}
}

0 comments on commit f645e0b

Please sign in to comment.