Skip to content

Commit

Permalink
fix(admin-ui): Fix display of facet value custom fields
Browse files Browse the repository at this point in the history
Fixes #1282
  • Loading branch information
michaelbromley committed Dec 10, 2021
1 parent c3a21ff commit f4a6dbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,9 @@
</td>
<td class="align-middle"><input type="text" formControlName="code" readonly /></td>
<td class="" *ngIf="customValueFields.length">
<!-- <ng-container *ngFor="let customField of customValueFields">-->
<!-- -->
<!-- <vdr-custom-field-control-->
<!-- *ngIf="customValueFieldIsSet(i, customField.name)"-->
<!-- entityName="FacetValue"-->
<!-- [showLabel]="false"-->
<!-- [customFieldsFormGroup]="detailForm.get(['values', i, 'customFields'])"-->
<!-- [customField]="customField"-->
<!-- ></vdr-custom-field-control>-->
<!-- -->
<!-- </ng-container>-->
<vdr-tabbed-custom-fields
entityName="FacetValue"
[customFields]="customFields"
[customFields]="customValueFields"
[compact]="true"
[customFieldsFormGroup]="detailForm.get(['values', i, 'customFields'])"
[readonly]="!(updatePermission | hasPermission)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export class TabbedCustomFieldsComponent implements OnInit {
tabMap.set(tabName, [field]);
}
}
return Array.from(tabMap.entries()).map(([tabName, customFields]) => ({ tabName, customFields }));
return Array.from(tabMap.entries())
.sort((a, b) => (a[0] < b[0] ? -1 : 1))
.map(([tabName, customFields]) => ({ tabName, customFields }));
}
}

0 comments on commit f4a6dbd

Please sign in to comment.