Skip to content

Commit

Permalink
Correct filterAttribute usage in renderFilterCellContent fixes #1064
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Jul 23, 2023
1 parent 49182ff commit 71d9f58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGE.md
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions src/DataColumn.php
Expand Up @@ -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)) {
Expand All @@ -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);

Expand Down

0 comments on commit 71d9f58

Please sign in to comment.