mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 04:37:42 +08:00
Fix #19508: Fix wrong selection for boolean attributes in GridView
This commit is contained in:
@ -4,7 +4,7 @@ Yii Framework 2 Change Log
|
||||
2.0.47 under development
|
||||
------------------------
|
||||
|
||||
- no changes in this release.
|
||||
- Bug #19508: Fix wrong selection for boolean attributes in GridView (alnidok)
|
||||
|
||||
|
||||
2.0.46 August 18, 2022
|
||||
|
||||
@ -216,10 +216,10 @@ class DataColumn extends Column
|
||||
$error = '';
|
||||
}
|
||||
if (is_array($this->filter)) {
|
||||
$options = array_merge(['prompt' => ''], $this->filterInputOptions);
|
||||
$options = array_merge(['prompt' => '', 'strict' => true], $this->filterInputOptions);
|
||||
return Html::activeDropDownList($model, $this->filterAttribute, $this->filter, $options) . $error;
|
||||
} elseif ($this->format === 'boolean') {
|
||||
$options = array_merge(['prompt' => ''], $this->filterInputOptions);
|
||||
$options = array_merge(['prompt' => '', 'strict' => true], $this->filterInputOptions);
|
||||
return Html::activeDropDownList($model, $this->filterAttribute, [
|
||||
1 => $this->grid->formatter->booleanFormat[1],
|
||||
0 => $this->grid->formatter->booleanFormat[0],
|
||||
|
||||
Reference in New Issue
Block a user