Take care that activeInput is always correctly set and not only toggled. Otherwise the state is wrong, when I remove the parent via the icon, resulting in styling errors.

pull/8414/head
Henriette Darge 4 years ago
parent 3557a1888b
commit ab49692204
  1. 4
      frontend/src/app/components/work-packages/wp-breadcrumb/wp-breadcrumb.component.ts
  2. 2
      frontend/src/app/components/work-packages/wp-breadcrumb/wp-breadcrumb.html
  3. 2
      frontend/src/app/components/work-packages/wp-breadcrumb/wp-breadcrumb.sass

@ -55,6 +55,10 @@ export class WorkPackageBreadcrumbComponent {
public get hierarchyLabel() {
return (this.hierarchyCount === 1) ? this.text.parent : this.text.hierarchy;
}
public updateActiveInput(val:boolean) {
this.inputActive = val;
}
}

@ -20,7 +20,7 @@
</ng-container>
<li
[ngClass]="{ 'active-parent-select': inputActive, 'icon4 icon-small icon-arrow-right5': !inputActive && hierarchyCount > 1 }">
<wp-breadcrumb-parent (onSwitch)="inputActive = !inputActive" [workPackage]="workPackage"></wp-breadcrumb-parent>
<wp-breadcrumb-parent (onSwitch)="updateActiveInput($event)" [workPackage]="workPackage"></wp-breadcrumb-parent>
</li>
</ul>
</div>

@ -1,2 +1,2 @@
.active-parent-select
width: 100%
min-width: 320px

Loading…
Cancel
Save