nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
3.53k stars 409 forks source link

Carousel and .value.select(n) not working correctly #1844

Open KealanAU opened 2 weeks ago

KealanAU commented 2 weeks ago

Environment

Version

v2.15.2

Reproduction

https://stackblitz.com/edit/nuxt-ui-ddqck8?file=components%2Fgallery.vue

Description

When using the Carousel API for template ref and attempting to use ref.value.select(n), the select (page) functions only with the example that uses an interval. If you try to set it to start on a specific image in the Carousel when mounted with the usage of onMounted and/or use the next cycle with nextTick, it does not work.

Is there another way we're supposed to be setting on load, or is this a bug?

Additional context

  "dependencies": {
    "@iconify-json/heroicons": "^1.1.20",
    "@iconify-json/simple-icons": "^1.1.100",
    "@nuxt/content": "^2.12.1",
    "@nuxt/fonts": "^0.6.1",
    "@nuxt/image": "^1.6.0",
    "@nuxt/ui-pro": "^1.1.0",
    "@vueuse/core": "^10.9.0",
    "@vueuse/integrations": "^10.9.0",
    "nuxt": "^3.11.2",
    "nuxt-mail": "^5.0.1"
  },
  "dev

Logs

No response

probablyjassin commented 2 weeks ago

I also just ran into this problem

KealanAU commented 1 week ago

@probablyjassin, if you can find a workaround, please provide an example, I'm still stuck

probablyjassin commented 1 week ago

it just seems to be completely broken unfortunately