Closed gshilin closed 6 years ago
Hey @gshilin, unfortunately the initialState
properties will be unused once the component mounts into the DOM, and first/lastItemIndex
will be recalculated based on the scroll position. This hasn't been tested, but I would recommend adding code to scroll down the appropriate number of pixels in order to reach the desired first item. If you simply want to hide the first 10 items, you can remove them from your state.slides
array. Hope that helps!
I need to make the first visible item to have some predefined index. This is my code and it doesn't work, the first visible item always has index of zero