Commit 1603a2b0 authored by Klimov Paul's avatar Klimov Paul

`Nav::renderItem()` adjusted

parent b6087e2a
......@@ -4,6 +4,7 @@ Yii Framework 2 bootstrap extension Change Log
2.0.6 under development
-----------------------
- Bug #68: Fixed `yii\bootstrap\Nav` handling empty items (freezy-sk)
- Bug #81: Fixed `yii\bootstrap\ActiveField::radioList()` and `yii\bootstrap\ActiveField::checkboxList()` ignore `itemOptions` (mikehaertl)
- Bug #98: Fixed `yii\bootstrap\ButtonDropdown` setting `href` attribute for non `a` tags (13nightevil)
- Enh #45: Added support for Bootstrap checkbox/radio toggle buttons (RomeroMsk, klimov-paul)
......
......@@ -177,7 +177,9 @@ class Nav extends Widget
$active = $this->isItemActive($item);
}
if (!empty($items)) {
if (empty($items)) {
$items = '';
} else {
$linkOptions['data-toggle'] = 'dropdown';
Html::addCssClass($options, ['widget' => 'dropdown']);
Html::addCssClass($linkOptions, ['widget' => 'dropdown-toggle']);
......@@ -192,10 +194,6 @@ class Nav extends Widget
}
}
if (empty($items)) {
$items = '';
}
if ($this->activateItems && $active) {
Html::addCssClass($options, 'active');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment