mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-11 18:02:28 +03:00
.collapse('hide') on hidden uninit-ed collapsible no longer shows it; fixes #15315
Thanks to @peterblazejewicz & @Nikita240 Adds unit tests based on #14417 X-Ref: #14282 Closes #15807
This commit is contained in:
+1
-1
@@ -172,7 +172,7 @@
|
||||
var data = $this.data('bs.collapse')
|
||||
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
||||
|
||||
if (!data && options.toggle && option == 'show') options.toggle = false
|
||||
if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
|
||||
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user