Skip to content

Commit 86af16a

Browse files
committed
feat: add distinctUntilChanged
1 parent e763c0c commit 86af16a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/components/src/tabs/navigable/navigable-tab-group.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
import { ActivatedRoute } from '@angular/router';
1111
import { Color, FeatureState, NavigationParams, NavigationParamsType, NavigationService } from '@hypertrace/common';
1212
import { merge, Observable } from 'rxjs';
13-
import { map, startWith, tap } from 'rxjs/operators';
13+
import { distinctUntilChanged, map, startWith, tap } from 'rxjs/operators';
1414
import { NavigableTabComponent } from './navigable-tab.component';
1515

1616
@Component({
@@ -69,6 +69,7 @@ export class NavigableTabGroupComponent implements AfterContentInit {
6969
this.activeTab$ = merge(this.navigationService.navigation$, this.tabs.changes).pipe(
7070
startWith(undefined),
7171
map(() => this.findActiveTab()),
72+
distinctUntilChanged(),
7273
tap(activeTab => this.tabChange.emit(activeTab?.path))
7374
);
7475
}

0 commit comments

Comments
 (0)