diff --git a/CHANGE.md b/CHANGE.md index 4aa1231e..8ae886b7 100755 --- a/CHANGE.md +++ b/CHANGE.md @@ -7,6 +7,7 @@ Change Log: `yii2-grid` - (enh #1066, #1067): Enhance resizable columns plugin with new `visibilityWaitTimeout` setting. - (enh #1065): Add back `kv-export-form` class to export form. +- (bug #1064): Fix `filterAttribute` usage in `renderFilterCellContent`. - (enh #1057): Persist resize uniq column ids. - (enh #1056): Enhance GridView layout parts rendering for preventing wrong Bootstrap 5 plugin initializations. - (enh #1054): Update Dutch Translations. diff --git a/src/DataColumn.php b/src/DataColumn.php index 02025257..ea0c858f 100644 --- a/src/DataColumn.php +++ b/src/DataColumn.php @@ -263,7 +263,7 @@ protected function renderFilterCellContent() $widgetClass = $this->filterType; $options = [ 'model' => $this->grid->filterModel, - 'attribute' => $this->attribute, + 'attribute' => $this->filterAttribute, 'options' => $this->filterInputOptions, ]; if (is_array($this->filter)) { @@ -276,14 +276,14 @@ protected function renderFilterCellContent() if ($this->isFilterEqual(GridView::FILTER_RADIO)) { return Html::activeRadioList( $this->grid->filterModel, - $this->attribute, + $this->filterAttribute, $this->filter, $this->filterInputOptions ); } } if ($this->isFilterEqual(GridView::FILTER_CHECKBOX)) { - return Html::activeCheckbox($this->grid->filterModel, $this->attribute, $this->filterInputOptions); + return Html::activeCheckbox($this->grid->filterModel, $this->filterAttribute, $this->filterInputOptions); } $options = array_replace_recursive($this->filterWidgetOptions, $options);