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:
parent
bee859cc9c
commit
ae71e71fe1
3 changed files with 53 additions and 38 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue