Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)">
swapnil-verma-gl marked this conversation as resolved.
Show resolved Hide resolved
<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">
AleksanderSklorz marked this conversation as resolved.
Show resolved Hide resolved
<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
Loading