From a07ff9f4d664a3d133fc54438f0b6cb57209e59e Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Mon, 23 Sep 2024 18:08:35 +0300 Subject: [PATCH] refactor: add `tuiZonefreeScheduler` to `TuiInputFilesDirective` (#8883) --- .../kit/components/files/input-files/input-files.directive.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/kit/components/files/input-files/input-files.directive.ts b/projects/kit/components/files/input-files/input-files.directive.ts index 5dd9b37f4184..adfcaefda490 100644 --- a/projects/kit/components/files/input-files/input-files.directive.ts +++ b/projects/kit/components/files/input-files/input-files.directive.ts @@ -3,7 +3,7 @@ import {Directive, forwardRef, inject, Output} from '@angular/core'; import {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes'; import {EMPTY_ARRAY} from '@taiga-ui/cdk/constants'; import {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator'; -import {tuiControlValue} from '@taiga-ui/cdk/observables'; +import {tuiControlValue, tuiZonefreeScheduler} from '@taiga-ui/cdk/observables'; import {tuiInjectElement} from '@taiga-ui/cdk/utils/dom'; import type {TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance'; import { @@ -46,7 +46,7 @@ export class TuiInputFilesDirective protected readonly host = inject(forwardRef(() => TuiInputFiles)); @Output() - public readonly reject = timer(0).pipe( + public readonly reject = timer(0, tuiZonefreeScheduler()).pipe( switchMap(() => tuiControlValue(this.control.control)), map(() => tuiFilesRejected(this.control.control)), filter(({length}) => !!length),