Fixes #504- Tweak Library Category Behavior
kinda a weird solution, but introduces a variable so we can toggle expansion of "All libraries" alongside the list of categories
This commit is contained in:
parent
3df3953ae9
commit
9fb7e66355
|
@ -31,7 +31,7 @@
|
|||
</div>
|
||||
<mat-divider></mat-divider>
|
||||
<mat-accordion class="example-headers-align">
|
||||
<mat-expansion-panel [expanded]="selectedSpec && selectedSpec.library === true">
|
||||
<mat-expansion-panel [expanded]="library_toggle" (opened)="libraryToggle(true)">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
<h4>All Libraries</h4>
|
||||
|
@ -69,7 +69,7 @@
|
|||
|
||||
<div *ngIf="!(searchField.value && cat.workflow_specs.length === 0)">
|
||||
<ng-container *ngIf="!(cat.id === null && cat.workflow_specs.length === 0)">
|
||||
<mat-expansion-panel hideToggle (opened)="selectCat(cat)" [expanded]="isSelected(cat)">
|
||||
<mat-expansion-panel hideToggle (opened)="selectCat(cat); libraryToggle(false)" [expanded]="isSelected(cat) && !library_toggle" >
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-description>
|
||||
<div *ngIf="cat.admin" style="color: darkorange">
|
||||
|
|
|
@ -52,9 +52,8 @@ export class WorkflowSpecListComponent implements OnInit {
|
|||
selectedCat: WorkflowSpecCategory;
|
||||
workflowSpecsByCategory: WorkflowSpecCategoryGroup[] = [];
|
||||
categories: WorkflowSpecCategory[];
|
||||
// moveUp = moveArrayElementUp;
|
||||
// moveDown = moveArrayElementDown;
|
||||
searchField: FormControl;
|
||||
library_toggle: boolean;
|
||||
|
||||
constructor(
|
||||
private api: ApiService,
|
||||
|
@ -101,6 +100,10 @@ export class WorkflowSpecListComponent implements OnInit {
|
|||
return this.selectedCat && this.selectedCat.id === cat.id;
|
||||
}
|
||||
|
||||
libraryToggle(t: boolean) {
|
||||
this.library_toggle = t;
|
||||
}
|
||||
|
||||
selectSpec(selectedSpec?: WorkflowSpec) {
|
||||
this.selectedSpec = selectedSpec;
|
||||
this.location.replaceState(environment.homeRoute + '/' + selectedSpec.id);
|
||||
|
@ -253,6 +256,7 @@ export class WorkflowSpecListComponent implements OnInit {
|
|||
wfs.forEach(ws => {
|
||||
if (selectedSpecName && selectedSpecName === ws.id) {
|
||||
this.selectedSpec = ws;
|
||||
this.library_toggle = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue