2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-14 18:42:30 +03:00

Collapse.js: Tweak active children selector, to search only .collapsing as for ui reasons, during show/hide, we toggle .collapse class too

This commit is contained in:
GeoSot
2022-01-17 11:31:38 +02:00
parent 5b31463e35
commit a2b32f1f5c
+2 -2
View File
@@ -41,7 +41,7 @@ const CLASS_NAME_HORIZONTAL = 'collapse-horizontal'
const WIDTH = 'width' const WIDTH = 'width'
const HEIGHT = 'height' const HEIGHT = 'height'
const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing' const SELECTOR_ACTIVES = '.collapse.show, .collapsing'
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]' const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]'
const Default = { const Default = {
@@ -124,7 +124,7 @@ class Collapse extends BaseComponent {
.map(element => Collapse.getOrCreateInstance(element, { toggle: false })) .map(element => Collapse.getOrCreateInstance(element, { toggle: false }))
} }
if (activeChildren.length && activeChildren[0]._isTransitioning) { if (activeChildren.some(instance => instance._isTransitioning)) {
return return
} }