Skip to content

Commit

Permalink
fix(package): added debounce time to the component
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyNahas committed Dec 3, 2019
1 parent 08b6d8d commit 7374ae0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {FormControl} from '@angular/forms';
import {COUNTRIES_DB} from './db';
import {Observable} from 'rxjs';
import {map, startWith} from 'rxjs/operators';
import {debounceTime, map, startWith} from 'rxjs/operators';
import {MatAutocompleteSelectedEvent, MatFormFieldAppearance} from '@angular/material';

/**
Expand Down Expand Up @@ -44,6 +44,7 @@ export class MatSelectCountryComponent implements OnInit {
this.filteredOptions = this.countryFormControl.valueChanges
.pipe(
startWith(''),
debounceTime(300),
map(value => this._filter(value))
);
}
Expand Down

0 comments on commit 7374ae0

Please sign in to comment.