mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-25 03:01:21 +08:00
Allow single items to set their encoding option
This commit is contained in:
@@ -80,7 +80,8 @@ class Dropdown extends Widget
|
||||
if (!isset($item['label'])) {
|
||||
throw new InvalidConfigException("The 'label' option is required.");
|
||||
}
|
||||
$label = $this->encodeLabels ? Html::encode($item['label']) : $item['label'];
|
||||
$encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels;
|
||||
$label = $encodeLabel ? Html::encode($item['label']) : $item['label'];
|
||||
$options = ArrayHelper::getValue($item, 'options', []);
|
||||
$linkOptions = ArrayHelper::getValue($item, 'linkOptions', []);
|
||||
$linkOptions['tabindex'] = '-1';
|
||||
|
||||
Reference in New Issue
Block a user