title: Filter options not working for ngx-datatables in angular
body: <p>Tried for filter option in ngx-datatables for all columns but not working. I have written code but it i9s not working. Where I did a mistake in my code. Anyone can help me to find the solutions.</p>
  <p>app.component.html:</p>
  <pre><code>    &lt;label&gt; Name &lt;/label&gt;
      &lt;input
        #name
        id=&quot;search&quot;
        type=&quot;text&quot;
        class=&quot;form-control&quot;
        placeholder=&quot;Search&quot;
        aria-label=&quot;Search&quot;
        aria-describedby=&quot;basic-addon1&quot;
      /&gt;
  
      &lt;label&gt; Company &lt;/label&gt;
      &lt;input
        #company
        id=&quot;search&quot;
        type=&quot;text&quot;
        class=&quot;form-control&quot;
        placeholder=&quot;Search&quot;
        aria-label=&quot;Search&quot;
        aria-describedby=&quot;basic-addon1&quot;
      /&gt;
  
      &lt;label&gt; Date  &lt;/label&gt;
      &lt;input
        #date
        id=&quot;search&quot;
        type=&quot;text&quot;
        class=&quot;form-control&quot;
        placeholder=&quot;Search&quot;
        aria-label=&quot;Search&quot;
        aria-describedby=&quot;basic-addon1&quot;
      /&gt;
  
  
      &lt;button (click)=&quot;updateTable()&quot;&gt; Search &lt;/button&gt; 
  
    &lt;ngx-datatable #table class=&quot;bootstrap ngx-datatable&quot; [columns]=&quot;columns&quot; [rows]=&quot;rows&quot; [columnMode]=&quot;'force'&quot;
      [headerHeight]=&quot;35&quot; [rowHeight]=&quot;'auto'&quot; [footerHeight]=&quot;50&quot; [limit]=&quot;10&quot;&gt;
    &lt;/ngx-datatable&gt;
  </code></pre>
  <p>app.component.ts:</p>
  <pre><code>  updateTable() { 
        let filterName = this.name.nativeElement.value
        .toString()
        .toLowerCase()
        .trim();
        let filterCompany = this.company.nativeElement.value
        .toString()
        .toLowerCase()
        .trim();
        let filterDate = this.date.nativeElement.value
        .toString()
        .toLowerCase()
        .trim();
  
    this.rows = this.filteredData.filter(item =&gt; {
       for (let i = 0; i &lt; this.columnsWithSearch.length; i++) {
      var colValue = item[this.columnsWithSearch[i]];
  
      if (
        !filterName ||
        !filterCompany ||
        !filterDate ||
        (!!colValue &amp;&amp;
          colValue
            .toString()
            .toLowerCase()
            .indexOf(filterName) !== -1)
      ) {
        return true;
      }
    }
  });
  }
  </code></pre>
  <p>Demo: <a href="https://stackblitz.com/edit/angular-ngx-datatables-filter-all-columns-evltmj?file=src%2Fapp%2Fapp.component.ts" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-ngx-datatables-filter-all-columns-evltmj?file=src%2Fapp%2Fapp.component.ts</a></p>