Skip to content

Commit

Permalink
fix(kit): TabsWithMore fix freezing on resize loop (#121)
Browse files Browse the repository at this point in the history
Co-authored-by: Roman Sedov <darragon-nn@yandex.ru>
  • Loading branch information
waterplea and MarsiBarsi authored Jan 20, 2021
1 parent e0e661b commit b87737a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
.bar {
.shadow();
flex: 0 0 100%;
background: var(--tui-base-06);
background: var(--tui-base-07);
color: var(--tui-base-01);

&_light {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from '@ng-web-apis/mutation-observer';
import {TuiDestroyService, TuiResizeService} from '@taiga-ui/cdk';
import {merge, Observable} from 'rxjs';
import {filter, startWith, takeUntil, tap} from 'rxjs/operators';
import {debounceTime, filter, startWith, takeUntil, tap} from 'rxjs/operators';

export function tabsRefreshFactory(
resize$: Observable<unknown>,
Expand All @@ -22,6 +22,7 @@ export function tabsRefreshFactory(
).pipe(
// Ignoring cases when host is detached from DOM
filter(() => body.contains(nativeElement)),
debounceTime(0),
startWith(null),
takeUntil(destroy$),
);
Expand Down

0 comments on commit b87737a

Please sign in to comment.