akiran / react-slick

React carousel component
http://react-slick.neostack.com/
MIT License
11.76k stars 2.11k forks source link

Need Active Slide Index on Init #1726

Open onlyveen opened 4 years ago

onlyveen commented 4 years ago

I have this situation where i should add and delete slides dynamically. Iam getting active index on change where i cannot get active index after deleting.

https://codesandbox.io/s/react-slick-playground-gd6lr

mominafiz commented 4 years ago

You can use initialSlide settings to set the value. The solution looks simple to your problem, but I hope this solves your problem.

wuliupo commented 4 years ago

but if infinite=true, the initialSlide does not work