akiran / react-slick

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

Custom navigation buttons outside & with correct disabled state #2271

Open simonhenke opened 10 months ago

simonhenke commented 10 months ago

As described in #2013, it's possible to render navigation buttons outside of the slider component by passing the Slider ref and calling the respective methods on it (slickNext() and slickPrev()).

However, I didn't find a way to correctly disable the buttons based on the current slider state. Maybe some additional properties like hasNext or hasPrev should be exposed on the Slider class?