Advertisement
FiringBlanks

new filterSchools() 2

Oct 27th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. filterSchools(){
  2. console.log('New filterSchools() is running');
  3. if(this.debounceTimer){
  4. console.log('New filterSchools() - debounceTimer');
  5. clearTimeout(this.debounceTimer)
  6. } else {
  7. console.log('New filterSchools() - else');
  8. this.debounceTimer = setTimeout(() => {
  9. this.schoolsObs = this.myService.fetchSchools().pipe(
  10. map((data) => this.performFilter(data))
  11. );
  12. }, 300);
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement