mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-28 06:20:15 +02: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:
committed by
XhmikosR
parent
bee859cc9c
commit
ae71e71fe1
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user