Giter VIP home page Giter VIP logo

Comments (13)

davidjerleke avatar davidjerleke commented on May 18, 2024 1

Released with v7.

from embla-carousel.

davidjerleke avatar davidjerleke commented on May 18, 2024 1

@rojadesign would you mind creating a CodeSandbox with your setup? That’s a requirement from my side if you want me to debug and hopefully pinpoint why this is happening.

from embla-carousel.

rojadesign avatar rojadesign commented on May 18, 2024 1

@davidjerleke thank you for your time. Here is the Vue3 + TypeScript template used - not really working but the same error I have locally also appears there:

Property 'clickAllowed' does not exist on type 'EmblaCarouselType | HTMLElement'.
Property 'clickAllowed' does not exist on type 'HTMLElement'.ts(2339)

from embla-carousel.

davidjerleke avatar davidjerleke commented on May 18, 2024 1

@rojadesign yes, this is clearly a TypeScript related bug in the embla-carousel-vue package because the typings are wrong. The type for emblaApi should be EmblaCarouselType | null. I'll have to look into this when possible. Feel free to propose a solution if you want. The Vue wrapper code is here.

Thank you for reporting this. I created the following bug report where we can track the bug:

Best,
David

from embla-carousel.

sinneren avatar sinneren commented on May 18, 2024

Is it working with Vue 2 + @nuxtjs/composition-api ?

from embla-carousel.

davidjerleke avatar davidjerleke commented on May 18, 2024

@sinneren thank you for your question. It only works with Vue 3.

from embla-carousel.

rojadesign avatar rojadesign commented on May 18, 2024

@davidjerleke I'm not sure if I do something wrong and maybe it's a dumb question, but how can I access the clickAllowed method?

I only get scrollTo suggested, as no other property seems to exist:
image

Edit: seems to be a TypeScript error but I don't get why the scrollTo is shown as available.

from embla-carousel.

rojadesign avatar rojadesign commented on May 18, 2024

@davidjerleke thank you for your response. Here is a link to the sandbox. I'm not sure if the vue setup syntax is a problem or maybe the only problem.

from embla-carousel.

davidjerleke avatar davidjerleke commented on May 18, 2024

@rojadesign I think the setup is not working as expected because importing onMounted shouldn't cause any errors. Would you mind trying the following Vue3 + TypeScript template instead?

from embla-carousel.

spoitler avatar spoitler commented on May 18, 2024

Hello,
Can this work with the api option ? I can't.

from embla-carousel.

davidjerleke avatar davidjerleke commented on May 18, 2024

@spoitler I don’t understand the question. Would you mind clarifying what you mean?

from embla-carousel.

spoitler avatar spoitler commented on May 18, 2024

is it necessary to use the setup() function to initialize it ?

from embla-carousel.

davidjerleke avatar davidjerleke commented on May 18, 2024

@spoitler yes I think so.

from embla-carousel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.