title: angular 2 search input with debounceTime and onFocusOut
body: <p>I have a problem with search input. In Angular 2 project I have search input: </p>
  
  <pre><code> &lt;input [(ngModel)]="data.value" (keyup)="input$.next($event)" (focusout)="onFocusOut($event)" /&gt;
  </code></pre>
  
  <p>and on my typescrirpt: </p>
  
  <pre><code>input$ = new Subject&lt;any&gt;();
  ngOnInit() {
    this.input$
      .do(this.keyUpEventHandler.bind(this))
      .debounceTime(3000)
      .distinctUntilChanged()
      .subscribe((value) =&gt; {
        console.log('afterDebounce', value);
  // do http request in service
          });
    }
  
    onFocusOut(event) {
      //this.input$.skipLast(1);
     // do http request in service immediately 
    }
  </code></pre>
  
  <p>And my problem is when I typing... and click enter, simply lost focus from my input component, I call http request but after 3 seconds also call once again. Is any solution to dismiss that last next for input$ observable? </p>
  
  <p>I don't like to unsubscribe whole observable, because I'd like to use it later (if user want to search data) 
  Thanks! </p>