Next Page isn't calculated properly between responsive breakpoints
- 主要语言
- JavaScript
- 星标
- 11.9k
- 派生
- 2.1k
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hello, I'm running into an issue when you have enough slides for more than 2 pages, the `nextPage` parameter in `beforeChange` isn't calculated properly for responsive carousels with varying rows (ex. `row: 1` vs `row: 4`).
Whenever you're on a page that's not the first or last page of the carousel and adjust the window size to trigger the responsive breakpoint, it defaults to the last page. Can try adding more slides in the example below to verify, the same issue still occurs.
This is the replicated example here: [CodeSandBox](https://codesandbox.io/s/react-slick-playground-forked-mq20b?file=/index.js)
From the replicated example above, I was expecting that if I was on page 2 (middle page) before the breakpoint trigger, after the breakpoint, `nextPage` in `beforeChange` would be 1 instead of 2.
`nextPage` before breakpoint

`nextPage` after breakpoint

)
Wondering if this is the expected behaviour or not.
Any possible fix or work around would be great, thanks!
贡献指南
评估
这个 Issue 还没有评估数据。