Fix dropdown & test data-bs usage (#46)

* Fix dropdown & test data-bs usage
* fix test
* Add changelog entry
This commit is contained in:
Mehdi Achour 2022-08-08 13:38:55 +01:00 committed by GitHub
parent ec932afff9
commit fe254a7d1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -7,6 +7,7 @@ Yii Framework 2 bootstrap5 extension Change Log
- Bug #43: Accordion widget does not set "collapsed" class on toggle button (simialbi)
- Enh #39: Add inline mode to `BaseHtml::checkboxList()` and `BaseHtml::radioList()` (WinterSilence)
- Enh #40: Breadcrumbs refactoring (WinterSilence)
- Bug #46: Fix data-attribute usage for Dropdown toggle (machour)
2.0.3 April 22, 2022

View File

@ -20,7 +20,7 @@ use yii\helpers\ArrayHelper;
*
* ```php
* <div class="dropdown">
* <a href="#" data-toggle="dropdown" class="dropdown-toggle">Label <b class="caret"></b></a>
* <a href="#" data-bs-toggle="dropdown" class="dropdown-toggle">Label <b class="caret"></b></a>
* <?php
* echo Dropdown::widget([
* 'items' => [

View File

@ -50,7 +50,7 @@ HTML;
'type' => 'button',
'class' => ['btn', 'btn-secondary'],
'data' => [
'dismiss' => 'modal'
'bs-dismiss' => 'modal'
]
]) . "\n" . Html::button('Save changes', [
'type' => 'button',
@ -74,7 +74,7 @@ HTML;
<p>Woohoo, you're reading this text in a modal!</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>