Browse Source

fix(core): fix wrong import

pull/2893/head
mehmet-erim 7 years ago
parent
commit
96f4ef8d83
  1. 17
      npm/ng-packs/packages/core/src/lib/directives/debounce.directive.ts

17
npm/ng-packs/packages/core/src/lib/directives/debounce.directive.ts

@ -1,5 +1,13 @@
import { Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core'; import {
import { takeUntilDestroy } from '@ngx-validate/core'; Directive,
ElementRef,
EventEmitter,
Input,
OnDestroy,
OnInit,
Output,
} from '@angular/core';
import { takeUntilDestroy } from '../utils/rxjs-utils';
import { fromEvent } from 'rxjs'; import { fromEvent } from 'rxjs';
import { debounceTime } from 'rxjs/operators'; import { debounceTime } from 'rxjs/operators';
@ -16,10 +24,7 @@ export class InputEventDebounceDirective implements OnInit, OnDestroy {
ngOnInit(): void { ngOnInit(): void {
fromEvent(this.el.nativeElement, 'input') fromEvent(this.el.nativeElement, 'input')
.pipe( .pipe(debounceTime(this.debounce), takeUntilDestroy(this))
debounceTime(this.debounce),
takeUntilDestroy(this),
)
.subscribe((event: Event) => { .subscribe((event: Event) => {
this.debounceEvent.emit(event); this.debounceEvent.emit(event);
}); });

Loading…
Cancel
Save