[ACS-5611] Add the option to initially expand custom panel (#8986)

This commit is contained in:
MichalKinas 2023-10-12 17:08:35 +02:00 committed by GitHub
parent 96d0a617a4
commit c637f3eb2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -78,7 +78,7 @@
</adf-categories-management>
</div>
</ng-container>
<mat-expansion-panel *ngFor="let customPanel of customPanels">
<mat-expansion-panel *ngFor="let customPanel of customPanels" [expanded]="canExpandTheCard(customPanel.panelTitle)">
<mat-expansion-panel-header>
<mat-panel-title>{{ customPanel.panelTitle | translate }}</mat-panel-title>
</mat-expansion-panel-header>
@ -90,7 +90,7 @@
class="adf-metadata-grouped-properties-container">
<mat-expansion-panel *ngIf="showGroup(group) || editable"
[attr.data-automation-id]="'adf-metadata-group-' + group.title"
[expanded]="canExpandTheCard(group) || !displayDefaultProperties && first">
[expanded]="canExpandTheCard(group.title) || !displayDefaultProperties && first">
<mat-expansion-panel-header>
<mat-panel-title>
{{ group.title | translate }}

View File

@ -296,8 +296,8 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
return properties.length > 0;
}
canExpandTheCard(group: CardViewGroup): boolean {
return group.title === this.displayAspect;
canExpandTheCard(groupTitle: string): boolean {
return groupTitle === this.displayAspect;
}
canExpandProperties(): boolean {