Skip to content

Commit

Permalink
chore(demo): DocDemo remove tuiZonefreeScheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlufy committed Oct 9, 2024
1 parent 2756608 commit 220a4d8
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions projects/addon-doc/components/demo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ import {JsonPipe, Location, NgIf, NgTemplateOutlet} from '@angular/common';
import type {AfterViewInit, ElementRef} from '@angular/core';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
computed,
ContentChild,
DestroyRef,
inject,
Input,
NgZone,
signal,
TemplateRef,
ViewChild,
Expand All @@ -23,7 +21,6 @@ import {TUI_DOC_DEMO_TEXTS, TUI_DOC_URL_STATE_HANDLER} from '@taiga-ui/addon-doc
import type {TuiDemoParams} from '@taiga-ui/addon-doc/types';
import {tuiCleanObject, tuiCoerceValueIsTrue} from '@taiga-ui/addon-doc/utils';
import {TuiResizable, TuiResizer} from '@taiga-ui/cdk/directives/resizer';
import {tuiZonefreeScheduler} from '@taiga-ui/cdk/observables';
import {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';
import {tuiClamp, tuiToInteger} from '@taiga-ui/cdk/utils/math';
import {tuiPure, tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';
Expand Down Expand Up @@ -81,8 +78,6 @@ export class TuiDocDemo implements AfterViewInit {

private readonly el = tuiInjectElement();
private readonly destroyRef = inject(DestroyRef);
private readonly cdr = inject(ChangeDetectorRef);
private readonly ngZone = inject(NgZone);
private readonly locationRef = inject(Location);
private readonly urlSerializer = inject(UrlSerializer);
private readonly urlStateHandler = inject(TUI_DOC_URL_STATE_HANDLER);
Expand Down Expand Up @@ -122,14 +117,12 @@ export class TuiDocDemo implements AfterViewInit {
public sticky = true;

public ngAfterViewInit(): void {
timer(0, tuiZonefreeScheduler(this.ngZone))
timer(0)
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe(() => {
this.createForm();
this.updateWidth(this.sandboxWidth + this.delta);
this.rendered.set(true);

this.cdr.detectChanges();
});
}

Expand Down

0 comments on commit 220a4d8

Please sign in to comment.