Browse Source

Fixed `yii\bootstrap\ButtonDropdown` renders two buttons have same with id if 'split' is enabled

tags/2.0.6
Klimov Paul 10 years ago
parent
commit
53db15c379
  1. 2
      ButtonDropdown.php
  2. 1
      CHANGELOG.md

2
ButtonDropdown.php

@ -74,6 +74,7 @@ class ButtonDropdown extends Widget
*/
public function run()
{
// @todo use [[options]] instead of [[containerOptions]] and introduce [[buttonOptions]] before 2.1 release
Html::addCssClass($this->containerOptions, 'btn-group');
$options = $this->containerOptions;
$tag = ArrayHelper::remove($options, 'tag', 'div');
@ -102,6 +103,7 @@ class ButtonDropdown extends Widget
$options = $this->options;
$this->options['data-toggle'] = 'dropdown';
Html::addCssClass($this->options, 'dropdown-toggle');
unset($this->options['id']);
$splitButton = Button::widget([
'label' => '<span class="caret"></span>',
'encodeLabel' => false,

1
CHANGELOG.md

@ -9,6 +9,7 @@ Yii Framework 2 bootstrap extension Change Log
- Enh #41: Added `submenuOptions` support at `yii\bootstrap\Dropdown` (spikyjt, klimov-paul)
- Enh #42: Added support for the glyphicons via `yii\bootstrap\Html::icon()` (klimov-paul)
- Enh #43: Added support for the static form controls via `yii\bootstrap\Html` (klimov-paul)
- Enh #44: Fixed `yii\bootstrap\ButtonDropdown` renders two buttons have same with id if 'split' is enabled (klimov-paul)
2.0.4 May 10, 2015

Loading…
Cancel
Save