Skip to content

Commit c315b03

Browse files
committed
Add back reactivity by watching props.
1 parent b294377 commit c315b03

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/runtime/components/Carousel.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,11 @@ const loadPlugins = async () => {
213213
plugins.value = pluginList
214214
}
215215
216+
// Watch plugin props and reload plugins when they change
217+
watch(() => [props.autoplay, props.autoScroll, props.autoHeight, props.classNames, props.fade, props.wheelGestures], () => {
218+
loadPlugins()
219+
}, { immediate: true })
220+
216221
const [emblaRef, emblaApi] = useEmblaCarousel(options.value, plugins.value)
217222
218223
watch([options, plugins], () => {

0 commit comments

Comments
 (0)