[X] Not a question, feature request, or anything other than a bug report directly related to Svelte Splide. Use Discussions for these topics: https://github.com/Splidejs/splide/discussions
Version
0.2.1
Description
I am trying to change perPage value in options based on window width. If my screen is greater than 900px I want to show 2 items but for smaller screens, just 1 item per page.
Make the initial screen smaller than 900px and you would see one item per page as expected
Make the screen bigger, and you can see 2 items per page as expected
Now drag the screen to smaller size again, and you still see 2 items per page instead of 1 (while tileNumber is being shown as 1)
Expected Behaviour
The number of items per page should match tileNumber, which means when the tileNumber shows 1, we should see 1 item per page (for small screens), and when it is 2, we should be able to see 2 items per page.
Checks
Version
0.2.1
Description
I am trying to change
perPage
value in options based on window width. If my screen is greater than900px
I want to show2
items but for smaller screens, just1
item per page.This is my code:
Reproduction Link
https://codesandbox.io/s/test-splide-dynamic-options-npbsy9?file=/App.svelte
Steps to Reproduce
900px
and you would see one item per page as expectedtileNumber
is being shown as 1)Expected Behaviour
The number of items per page should match
tileNumber
, which means when thetileNumber
shows 1, we should see 1 item per page (for small screens), and when it is 2, we should be able to see 2 items per page.