title: Yii2 field filter not showing on GridView
body: <p>I cannot make my GridView filter by any field, the Grid displays ok, but my filter section appears in blank, this is the GridView declaration: </p>
  
  <pre><code>GridView::widget([
              'dataProvider' =&gt; $dataProvider,
              'filterModel' =&gt; $searchModel,
              'columns' =&gt; [
                  [
                  'attribute'=&gt;'nombre_sucursal',
                  'value'=&gt;'sucursal.nombre_sucursal',
                  'filter' =&gt; ArrayHelper::map(Sucursal::find()-&gt;asArray()-&gt;all(), 'id_sucursal', 'nombre_sucursal'),
                  'label'=&gt;'Sucursal'
                  ],
                  [
                  'attribute'=&gt;'nombre_materia',
                  'value'=&gt;'materia.nombre_materia',
                  'label'=&gt;'Materia'
                  ],
                  'fecha:datetime',
              ],
              'export'=&gt;false
          ]);?&gt;
  </code></pre>
  
  <p>this is the declarations of my searchModel and dataProvider:</p>
  
  <pre><code>$searchModel = new CalendarioSearch();
  $dataProvider = $searchModel-&gt;search(Yii::$app-&gt;request-&gt;queryParams);
  </code></pre>
  
  <p>And my search model is this:</p>
  
  <pre><code>class CalendarioSearch extends Model
  {
  /* your calculated attribute */
  public $nombre_sucursal;
  public $nombre_materia;
  
  /* setup rules */
  public function rules() {
     return [
      /* your other rules */
      [['nombre_sucursal'], 'safe'],
      [['nombre_materia'], 'safe']
     ];
  }
  
  
  public function search($params) {
      $query = Calendario::find();
      $dataProvider = new ActiveDataProvider([
          'query' =&gt; $query,
          'pagination' =&gt; [
              'pageSize' =&gt; 20,
          ],
          'sort' =&gt; [
              'defaultOrder' =&gt; ['fecha'=&gt;SORT_DESC],
              'attributes' =&gt; [
                  'nombre_sucursal' =&gt; [
                      'asc' =&gt; [
                          'id_sucursal' =&gt; SORT_ASC,
                          'fecha' =&gt; SORT_DESC
                      ],
                      'desc' =&gt; [
                          'id_sucursal' =&gt; SORT_DESC,
                          'fecha' =&gt; SORT_DESC
                      ],
                  ],
                  'nombre_materia' =&gt; [
                      'asc' =&gt; [
                          'id_materia' =&gt; SORT_ASC,
                          'fecha' =&gt; SORT_DESC
                      ],
                      'desc' =&gt; [
                          'id_materia' =&gt; SORT_DESC,
                          'fecha' =&gt; SORT_DESC
                      ],
                  ],
                  'fecha' =&gt; [
                      'asc' =&gt; [
                          'fecha' =&gt; SORT_ASC,
                      ],
                      'desc' =&gt; [
                          'fecha' =&gt; SORT_DESC,
                      ],
                  ],
  
              ],
          ]
      ]);
  
      if (!($this-&gt;load($params) &amp;&amp; $this-&gt;validate())) {
          $query-&gt;joinWith(['sucursal']);
          $query-&gt;joinWith(['materia']);
          return $dataProvider;
      }
  
      $query-&gt;joinWith(['sucursal' =&gt; function ($q) {
          $q-&gt;where('c_sucursal.id_sucursal LIKE "%' . $this-&gt;nombre_sucursal . '%"');
      }]);
  
      $query-&gt;joinWith(['materia' =&gt; function ($q) {
          $q-&gt;where('c_materia.id_materia LIKE "%' . $this-&gt;nombre_materia . '%"');
      }]);
  
      return $dataProvider;
      }
  }
  </code></pre>
  
  <p>The document that I followed was <a href="http://www.yiiframework.com/wiki/621/filter-sort-by-calculated-related-fields-in-gridview-yii-2-0/#hh10" rel="noreferrer">this</a>.</p>