Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Slider Items uses the same key when fade settings attribute is set to true. #2123

Open
maxcotech opened this issue Feb 1, 2022 · 0 comments

Comments

@maxcotech
Copy link

maxcotech commented Feb 1, 2022

Version: 0.25.2

  • Steps to reproduce
  • Use the following settings to render dynamic slider items
 ` const settings = {
      fade: true,
      autoplay:true,
      infinite: true,
      speed: 500,
      slidesToShow: 1,
      slidesToScroll: 1
    }
 <Slider {...settings}>
              {
                images.map(function(item){
                  return (
                    <div key={item.id+item.banner_link} className="each-fade">
                      <div className="image-container">
                          <div key={item.id+item.banner_link} onClick={() => window.location.href = item.banner_link}  style={{backgroundImage:`url(${item.banner})`}} className="category-card" />
                          {/* <img style={{width:"100%",height:"70vh"}} src={item} /> */}
                      </div>
                    </div>
                  )
                })
              }
            </Slider>`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant