Skip to content

Commit

Permalink
Fix #1071: Enhance default dropdown filters styling for Bootstrap 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Jul 24, 2023
1 parent bc47e32 commit 4b08061
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Change Log: `yii2-grid`
**Date:** _Under development_

- (enh #1070): Enhance grid header styling for use without panel.

- (enh #1071): Enhance default dropdown filters styling for Bootstrap 5.x.

## Version 3.5.1

Expand Down
6 changes: 5 additions & 1 deletion src/ColumnTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
trait ColumnTrait
{
/**
* @var string an unique identifier for the Column. If not set, it will be automatically generated.
* @var string unique identifier for the Column. If not set, it will be automatically generated.
*/
public $columnKey;

Expand Down Expand Up @@ -185,6 +185,10 @@ public function initColumnSettings($settings = [])
}
}
$this->initColumnKey();

if (!empty($this->filter) && empty($this->filterType) && $this->grid->isBs(5)) {
Html::addCssClass($this->filterInputOptions, 'form-select');
}
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/DataColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
* The DataColumn is the default column type for the [[GridView]] widget and extends the [[YiiDataColumn]] with various
* enhancements.
*
* @property GridView $grid
*
* @author Kartik Visweswaran <kartikv2@gmail.com>
* @since 1.0
*/
Expand Down

0 comments on commit 4b08061

Please sign in to comment.