mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
gridview and listview use widget ID in base tag
This commit is contained in:
@ -134,6 +134,7 @@ Yii Framework 2 Change Log
|
||||
- Enh: Added param `hideOnSinglePage` to `yii\widgets\LinkPager` (arturf)
|
||||
- Enh: Added support for array attributes in `in` validator (creocoder)
|
||||
- Enh: Improved `yii\helpers\Inflector::slug` to support more cases for Russian, Hebrew and special characters (samdark)
|
||||
- Enh: ListView now uses the widget ID in the base tag, consistent to gridview (cebe)
|
||||
- Chg #2287: Split `yii\db\ColumnSchema::typecast()` into two methods `phpTypecast()` and `dbTypecast()` to allow specifying PDO type explicitly (cebe)
|
||||
- Chg #2898: `yii\console\controllers\AssetController` is now using hashes instead of timestamps (samdark)
|
||||
- Chg #2913: RBAC `DbManager` is now initialized via migration (samdark)
|
||||
|
@ -219,9 +219,6 @@ class GridView extends BaseListView
|
||||
if (!$this->formatter instanceof Formatter) {
|
||||
throw new InvalidConfigException('The "formatter" property must be either a Format object or a configuration array.');
|
||||
}
|
||||
if (!isset($this->options['id'])) {
|
||||
$this->options['id'] = $this->getId();
|
||||
}
|
||||
if (!isset($this->filterRowOptions['id'])) {
|
||||
$this->filterRowOptions['id'] = $this->options['id'] . '-filters';
|
||||
}
|
||||
|
@ -101,6 +101,9 @@ abstract class BaseListView extends Widget
|
||||
if ($this->emptyText === null) {
|
||||
$this->emptyText = Yii::t('yii', 'No results found.');
|
||||
}
|
||||
if (!isset($this->options['id'])) {
|
||||
$this->options['id'] = $this->getId();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user