Splidejs / react-splide

The React component for the Splide slider/carousel.
https://splidejs.com/
MIT License
246 stars 58 forks source link

flickMaxPages option is ignored #71

Open leventdeniz opened 1 year ago

leventdeniz commented 1 year ago

Checks

Version

0.7.12

Description

This is my Splide component with options:

 <Splide
    options={{
      perPage: 1,
      perMove: 1,
      autoWidth: true,
      gap: 16,
      arrows: false,
      pagination: true,
      focus: 'center',
      flickMaxPages: 1,
      flickPower: 1,
      drag: true,
      snap: true,
    }}
  >

Now if i scroll real fast/flick it skips a lot of slides and does not only flick 1 slide at the time.

Reproduction Link

No response

Steps to Reproduce

have 3 or more items in basic slide configuration and flick real fast

Expected Behaviour

it should only go one slide at a time

leventdeniz commented 1 year ago

https://github.com/Splidejs/react-splide/assets/32421538/01cfc0e0-b8f6-4067-a81f-4d19acea4296

got a quick demo + code https://codesandbox.io/s/pedantic-cookies-kpprl2?file=/src/index.tsx

DanielSpindler commented 9 months ago

same problem here. any approaches?

DanielSpindler commented 9 months ago

Playing around with the Flickpower solved it for me. 600 is the default flickPower for anyone wondering. flickMaxPages defaults to 1 anyways.