Skip to content

Commit

Permalink
[ACS-5611] Add the option to initially expand custom panel
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalKinas committed Oct 10, 2023
1 parent 2f28ec9 commit 2332013
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2332013

Please sign in to comment.