fix: do not show discriminator dropdown if it is empty

This commit is contained in:
Roman Hotsiy 2017-05-12 11:35:47 +03:00
parent 131b437478
commit 7a5d315e09
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -83,7 +83,7 @@
<span *ngIf="prop.pattern" class="param-pattern">{{prop.pattern}}</span> <span *ngIf="prop.pattern" class="param-pattern">{{prop.pattern}}</span>
</div> </div>
<div class="param-description" [innerHtml]="prop.description | marked"></div> <div class="param-description" [innerHtml]="prop.description | marked"></div>
<div class="discriminator-info" *ngIf="prop.isDiscriminator"> <div class="discriminator-info" *ngIf="prop.isDiscriminator && descendants.length">
<drop-down (change)="selectDescendantByIdx($event)" [active]="activeDescendant.idx"> <drop-down (change)="selectDescendantByIdx($event)" [active]="activeDescendant.idx">
<option *ngFor="let descendant of descendants; let i=index" <option *ngFor="let descendant of descendants; let i=index"
[value]="i" [attr.selected]="descendant.active ? '' : null" >{{descendant.name}}</option> [value]="i" [attr.selected]="descendant.active ? '' : null" >{{descendant.name}}</option>