Skip to content

Commit

Permalink
fix: Panel-header viewchild value race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipLeitner committed Jan 15, 2024
1 parent 66d0bde commit 3d515f2
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
@@ -1,8 +1,7 @@
<ul class="w-100 nav nav-tabs pt-1 border-0 ps-1 flex-nowrap" style="height: 99%;"
*ngIf="{tab: selectedTab$ | async} as active ">
<ul class="w-100 nav nav-tabs pt-1 border-0 ps-1 flex-nowrap" style="height: 99%;">

<li *ngFor="let tab of panelTabs" class="nav-item" (click)="tabClicked(tab)" style="max-height:103%">
<a [class.active]="active.tab === tab" style="margin-top: 2px;"
<a [class.active]="(selectedTab$ | async) === tab" style="margin-top: 2px;"
class="active align-items-center d-flex h-100 justify-content-center nav-link" aria-current="page">
{{tab | translateHs : {module: translationModule} }}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export function toArray(panels: string) {
styleUrl: './panel-header.component.scss',
})
export class HsPanelHeaderComponent implements OnDestroy, OnInit {
@ViewChild('extraButtonsContainer', {static: true}) extraButtons: ElementRef;
@ViewChild('extraButtonsContainer', {static: true})
extraButtons: ElementRef;
active: string;
private end = new Subject<void>();

Expand Down

0 comments on commit 3d515f2

Please sign in to comment.