mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
Fix rxjs debounceTime (#2687)
This commit is contained in:
parent
ed35a291b4
commit
c605ee38a7
@ -19,6 +19,7 @@ import { PeopleProcessService, UserProcessModel } from '@alfresco/adf-core';
|
|||||||
import { Component, Directive, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
|
import { Component, Directive, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
|
||||||
import { FormControl } from '@angular/forms';
|
import { FormControl } from '@angular/forms';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
import { debounceTime } from 'rxjs/operators';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-people-search',
|
selector: 'adf-people-search',
|
||||||
@ -51,9 +52,10 @@ export class PeopleSearchComponent implements OnInit {
|
|||||||
selectedUser: UserProcessModel;
|
selectedUser: UserProcessModel;
|
||||||
|
|
||||||
constructor(public peopleProcessService: PeopleProcessService) {
|
constructor(public peopleProcessService: PeopleProcessService) {
|
||||||
this.searchUser
|
this.searchUser.valueChanges
|
||||||
.valueChanges
|
.pipe(
|
||||||
.debounceTime(200)
|
debounceTime(200)
|
||||||
|
)
|
||||||
.subscribe((event: string) => {
|
.subscribe((event: string) => {
|
||||||
if (event && event.trim()) {
|
if (event && event.trim()) {
|
||||||
this.searchPeople.emit(event);
|
this.searchPeople.emit(event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user