title: Delays in displaying search results using Ng-select
body: <p>I'm using the Ng-select component with a custom ajax search function on keyup event.</p>
  
  <p>Here's my code :</p>
  
  <pre><code>&lt;ng-select [items]="employes"
      bindLabel="displayName"
      [addTag]="false"
      [multiple]="true"
      [hideSelected]="true"
      labelForId="employesmultiselect"
      (keyup)="multiselectSearch($event)"
      [(ngModel)]="selectedEmploye"
      formControlName="multiselect" name="multiselect" id="multiselect" &gt;
  &lt;/ng-select&gt;
  </code></pre>
  
  <p>And here's the search function :</p>
  
  <pre><code>multiselectSearch(event: any) {
      const   employesmultiselect= ((document.getElementById("employesmultiselect") as HTMLInputElement).value);
      console.log(employesmultiselect);
      if (event.keyCode !== 40 &amp;&amp; event.keyCode !== 38) {
          if (employesmultiselect.length &gt; 2) {
              this.employeService.getEmployes(employesmultiselect)
              .subscribe(data =&gt; {
                  this.employes = &lt;IEmploye[]&gt;[];
                  this.employes = data;
                  console.log(employesmultiselect);
              });
          } else {
              this.employes = &lt;IEmploye[]&gt;[];
          }
      }
  }
  </code></pre>
  
  <p>The problem is when i type a text very fast, i don't get the expected results</p>
  
  <p>Example, if i type "user" fast, i get the results for "use", the results for use kind of overwrite the results for "user"</p>
  
  <p>Do you guys know how to fix this issue?</p>
  
  <p>Thanks a lot</p>