Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Cuppens <MartijnCuppens@users.noreply.github.com>2017-12-31 15:53:33 +0300
committerXhmikosR <xhmikosr@gmail.com>2017-12-31 15:53:33 +0300
commitae71e71fe1fa3bdbdec33c9eb19b76c346d4d5ff (patch)
treedcef53781b4d6cdea9ad679f0779d7068997e18c /js/src/collapse.js
parentbee859cc9c5217ee738f9d5b0183b381d2ccbff4 (diff)
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.
Diffstat (limited to 'js/src/collapse.js')
-rw-r--r--js/src/collapse.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/src/collapse.js b/js/src/collapse.js
index f4d140f272..eaad1be541 100644
--- a/js/src/collapse.js
+++ b/js/src/collapse.js
@@ -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
}