Comments (1)
You can simply change on your code and resolved this issue.
In ButtonDropDown.php line number : 109, you can find below code.
if ($this->split) {
$options = $this->options;
$this->options['data-toggle'] = 'dropdown';
Html::addCssClass($this->options, ['toggle' => 'dropdown-toggle']);
unset($options['id']);
$splitButton = Button::widget([
'label' => '<span class="caret"></span>',
'encodeLabel' => false,
'options' => $this->options,
'view' => $this->getView(),
]);
} else {
$label .= ' <span class="caret"></span>';
$options = $this->options;
Html::addCssClass($options, ['toggle' => 'dropdown-toggle']);
$options['data-toggle'] = 'dropdown';
$splitButton = '';
}
you can change in above code, in "ELSE" part only and solved "splitButton" option issue.
else {
$label .= ' <span class="caret"></span>';
$options = $this->options;
$options['data-toggle'] = 'dropdown';
Html::addCssClass($options, ['toggle' => 'dropdown-toggle']);
unset($options['id']);
$splitButton = '';
}
Here issue is that 'data-toggle' option want to add before "html" and need to unset "$options['id']" after html is ready.
from yii2-bootstrap.
Related Issues (20)
- Update 2.1 branch HOT 5
- yii\bootstrap\ButtonDropdown <ul> element id should follow master id property
- Move bower to npm branch master. HOT 4
- ActionColumn.php grid yii 2.1 with BS4. HOT 1
- Remove examples directory from assets? HOT 3
- Double encoded URL in Nav widget HOT 2
- Set menu item active without controller action HOT 1
- radioList has hardcoded HTML
- Collapse widget calls bad inline-script in HTML HOT 2
- Conflicts with the bootstrap version
- Collapse widget issue HOT 8
- Collapsed menu dropdown missing 1st level items
- Vulnerability CVE-2019-8331 HOT 1
- Collapse: If content is not an array, footer gets ignored HOT 1
- Api Documentation typo (dropDownOptions instead of dropdownOptions) HOT 1
- update .github folder link
- update docs folder link
- update src folder link
- update root folder link
- update getbootstrap links
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii2-bootstrap.