Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to access controller methods other than .go() #103

Open
2 tasks done
Sovai opened this issue Mar 27, 2024 · 1 comment
Open
2 tasks done

not able to access controller methods other than .go() #103

Sovai opened this issue Mar 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Sovai
Copy link

Sovai commented Mar 27, 2024

Checks

Version

0.6.12

Description

I have it like this in my template

<template>
       <Splide :options="options" ref="splide" @splide:active="onSlideMove">
          <SplideSlide>
            <TheMainPie />
          </SplideSlide>
          <SplideSlide>
            <TheMainBarChart />
          </SplideSlide>
        </Splide>

[...]
</template>

<script setup>

const splide = ref(null)
onMounted(() => {
  const slider = splide.value.splide;
  slider.go(1); // working as expected
  slider.scroll(1); // Unhandled Promise Rejection: TypeError: slider.scroll is not a function
  slider.move(1) // error
...

})

</script>

Reproduction Link

No response

Steps to Reproduce

  1. setup splide
  2. call splide methods via instance
    ...

Expected Behaviour

can use all the controller methods from original docs

@Sovai Sovai added the bug Something isn't working label Mar 27, 2024
@gvinson
Copy link

gvinson commented Jul 10, 2024

I confirm this behavior. I do not have access to the refresh method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants