Make subpanel container collapsed by default

This commit is contained in:
Clemente Raposo 2024-12-06 08:59:28 +00:00 committed by Jack Anderson
parent b4c3b13718
commit 05396d7022
2 changed files with 3 additions and 3 deletions

View file

@ -100,7 +100,7 @@
</div>
</div>
<div class="sub-panels">
<div class="sub-panels {{(isCollapsed() && !openSubpanels()?.length) ? 'pb-1' : ''}}">
<ng-container *ngFor="let subpanelKey of this.openSubpanels()">
<ng-container *ngIf="(subpanels[subpanelKey]) as item">
<scrm-subpanel *ngIf="item.show"

View file

@ -53,7 +53,7 @@ export class SubpanelContainerComponent implements OnInit, OnDestroy {
@Input() config: SubpanelContainerConfig;
isCollapsed = signal(false);
isCollapsed = signal(true);
toggleIcon = signal('arrow_down_filled');
maxColumns$: Observable<number>;
@ -88,7 +88,7 @@ export class SubpanelContainerComponent implements OnInit, OnDestroy {
ngOnInit(): void {
const module = this?.config?.parentModule ?? 'default';
this.setCollapsed(isTrue(this.preferences.getUi(module, 'subpanel-container-collapse') ?? false));
this.setCollapsed(isTrue(this.preferences.getUi(module, 'subpanel-container-collapse') ?? true));
const subpanelButtonLimits = this.systemConfigs.getConfigValue('recordview_subpanel_button_limits') ?? {};
if (subpanelButtonLimits && Object.keys(subpanelButtonLimits).length) {