mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-05 16:42:29 +03:00
Fix carousel buttons (#34266)
* test(carousel): add test to check if next/prev button work as intended * fix(carousel): merge passed config with instance config in carouselInterface
This commit is contained in:
+8
-1
@@ -498,7 +498,14 @@ class Carousel extends BaseComponent {
|
||||
static carouselInterface(element, config) {
|
||||
const data = Carousel.getOrCreateInstance(element, config)
|
||||
|
||||
const { _config } = data
|
||||
let { _config } = data
|
||||
if (typeof config === 'object') {
|
||||
_config = {
|
||||
..._config,
|
||||
...config
|
||||
}
|
||||
}
|
||||
|
||||
const action = typeof config === 'string' ? config : _config.slide
|
||||
|
||||
if (typeof config === 'number') {
|
||||
|
||||
Reference in New Issue
Block a user