Skip to content

Commit

Permalink
refactor(kit): ItemsWithMore change detection optimization (#8741)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov authored Aug 29, 2024
1 parent 8bdcb19 commit 610ce10
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {inject, Injectable} from '@angular/core';
import {MutationObserverService} from '@ng-web-apis/mutation-observer';
import {ResizeObserverService} from '@ng-web-apis/resize-observer';
import {tuiZoneOptimized} from '@taiga-ui/cdk/observables';
import {tuiZonefreeScheduler, tuiZoneOptimized} from '@taiga-ui/cdk/observables';
import {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';
import {tuiClamp} from '@taiga-ui/cdk/utils/math';
import {distinctUntilChanged, map, merge, Observable, share, throttleTime} from 'rxjs';
Expand All @@ -18,7 +18,7 @@ export class TuiItemsWithMoreService extends Observable<number> {
inject(MutationObserverService, {self: true}),
inject(ResizeObserverService, {self: true}),
).pipe(
throttleTime(0),
throttleTime(0, tuiZonefreeScheduler()),
map(() => this.getOverflowIndex()),
distinctUntilChanged(),
tuiZoneOptimized(),
Expand Down

0 comments on commit 610ce10

Please sign in to comment.