Closed csantos1113 closed 6 years ago
Since the 2.0.0 version of this component, the initialIndex property is not working:
2.0.0
initialIndex
import React from "react"; import { render } from "react-dom"; import Flickity from "react-flickity-component"; const flickityOptions = { initialIndex: 7 }; function Carousel() { return ( <Flickity options={flickityOptions}> <img src="http://via.placeholder.com/50x150" /> <img src="http://via.placeholder.com/100x150" /> <img src="http://via.placeholder.com/150x150" /> <img src="http://via.placeholder.com/250x150" /> <img src="http://via.placeholder.com/300x150" /> <img src="http://via.placeholder.com/350x150" /> <img src="http://via.placeholder.com/350x150" /> <img src="http://via.placeholder.com/350x150" /> <img src="http://via.placeholder.com/350x150" /> </Flickity> ); } render(<Carousel />, document.getElementById("root"));
See the live example: https://codesandbox.io/s/lljo6rkx2q
Thanks for reporting this bug. I'm working on a fix.
Since the
2.0.0
version of this component, theinitialIndex
property is not working:See the live example: https://codesandbox.io/s/lljo6rkx2q