Commit f2e245fe by Qiang Xue

Merge pull request #972 from cebe/grid-filter-only-active

Filter only active attributes in gridview
parents 4050a4b2 5ad8fe5f
......@@ -115,7 +115,9 @@ class DataColumn extends Column
{
if (is_string($this->filter)) {
return $this->filter;
} elseif ($this->filter !== false && $this->grid->filterModel instanceof Model && $this->attribute !== null) {
} elseif ($this->filter !== false && $this->grid->filterModel instanceof Model &&
$this->attribute !== null && $this->grid->filterModel->isAttributeActive($this->attribute))
{
if (is_array($this->filter)) {
$options = array_merge(array('prompt' => ''), $this->filterInputOptions);
return Html::activeDropDownList($this->grid->filterModel, $this->attribute, $this->filter, $options);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment