title: How to use custom filter for yii2 ListView widget?
body: <p>In my controller I rendered $dataProvider</p>
  
  <pre><code>$searchModel = new StudentSearch();
      $dataProvider = $searchModel-&gt;search(Yii::$app-&gt;request-&gt;queryParams);
  
      return $this-&gt;render('index', [
          'searchModel' =&gt; $searchModel,
          'dataProvider' =&gt; $dataProvider,
      ]);
  </code></pre>
  
  <p>Here is search function of StudentSearch</p>
  
  <pre><code>public function search($params)
  {
      $query = Student::find();
  
         $query-&gt;andFilterWhere([
          'student_id' =&gt; $this-&gt;student_id,
          'age' =&gt; $this-&gt;age,
  
      ]);
  
      $query-&gt;andFilterWhere(['like', 'firstname', $this-&gt;firstname]);
  
      $dataProvider = new ActiveDataProvider([
          'query' =&gt; $query,
      ]);
  
  
      if (!($this-&gt;load($params) &amp;&amp; $this-&gt;validate())) {
          return $dataProvider;
      }
  
      return $dataProvider;
  }
  </code></pre>
  
  <p>in view I used  $dataprivider in  ListView widget like below</p>
  
  <pre><code>  &lt;div class="listView"&gt;
  
     &lt;?php
      echo ListView::widget([
     'dataProvider' =&gt; $dataProvider,
      'itemView' =&gt; '_student_list',
      ]);
      ?&gt;
  
    &lt;/div&gt;
  </code></pre>
  
  <p>In   '_student_list.php' I listed students</p>
  
  <p>my filters</p>
  
  <pre><code>  &lt;div class="listFilter"&gt;
     &lt;input type="text" name="firstname"/&gt;
     &lt;input type="text" name="age"/&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>Now I want filter Students by firstname or age. How can I do this? If you have any solution to this problem please help. Thank you.</p>