Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ class Nav extends Widget
* Defaults to `null` which means `<b class="caret"></b>` will be used. To disable the caret, set this property to be an empty string.
*/
public $dropDownCaret;

/**
* @var array the HTML attributes for the label tag.
*/
public $labelOptions = [];

/**
* Initializes the widget.
Expand Down Expand Up @@ -166,7 +169,7 @@ public function renderItem($item)
}
$encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels;
$label = $encodeLabel ? Html::encode($item['label']) : $item['label'];
$options = ArrayHelper::getValue($item, 'options', []);
$options = isset($item['options']) ? $item['options'] : $this->labelOptions;
$items = ArrayHelper::getValue($item, 'items');
$url = ArrayHelper::getValue($item, 'url', '#');
$linkOptions = ArrayHelper::getValue($item, 'linkOptions', []);
Expand Down