Skip to content

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

Open
@Sovai

Description

@Sovai

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions