2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-21 13:24:08 +03:00

Allow nested structure for accordions (#25121)

This commit allows nested structures for accordions. Also a part of
the documentation about data-children is removed because this
functionality didn't work and it's not applicable anymore.

Tests with the collapse accordion are also a bit adjusted to the new
situation.
This commit is contained in:
Martijn Cuppens
2017-12-31 13:53:33 +01:00
committed by XhmikosR
parent bee859cc9c
commit ae71e71fe1
3 changed files with 53 additions and 38 deletions
+5 -1
View File
@@ -130,7 +130,11 @@ const Collapse = (($) => {
let activesData
if (this._parent) {
actives = $.makeArray($(this._parent).children().children(Selector.ACTIVES))
actives = $.makeArray(
$(this._parent)
.find(Selector.ACTIVES)
.filter(`[data-parent="${this._config.parent}"]`)
)
if (!actives.length) {
actives = null
}