2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-11 18:02:28 +03:00

upgrade to v4 stable

This commit is contained in:
Johann-S
2018-03-05 15:40:23 +01:00
committed by XhmikosR
parent 7f08061eca
commit 9744886519
4 changed files with 33 additions and 17 deletions
+11 -2
View File
@@ -142,7 +142,11 @@ class Collapse {
}
if (actives) {
activesData = Data.getData(actives[0], DATA_KEY)
const tempActiveData = actives.filter((elem) => {
const container = SelectorEngine.findOne(this._selector)
return !container.contains(elem)
})
activesData = tempActiveData[0] ? Data.getData(tempActiveData[0], DATA_KEY) : null
if (activesData && activesData._isTransitioning) {
return
}
@@ -154,7 +158,12 @@ class Collapse {
}
if (actives) {
actives.forEach((elemActive) => Collapse._collapseInterface(elemActive, 'hide'))
actives.forEach((elemActive) => {
const container = SelectorEngine.findOne(this._selector)
if (!container.contains(elemActive)) {
Collapse._collapseInterface(elemActive, 'hide')
}
})
if (!activesData) {
Data.setData(actives[0], DATA_KEY, null)
}