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

Can't drag and not getting on center #1658

Open
seyedasfar opened this issue Oct 21, 2019 · 0 comments
Open

Can't drag and not getting on center #1658

seyedasfar opened this issue Oct 21, 2019 · 0 comments

Comments

@seyedasfar
Copy link

I'm facing some issues I can't able to drag slide item and slide not on center and when I set centerMode: true adding 1+ to slides, means If I set slidesToShow: 4 it shows 5

Screenshot from 2019-10-21 08-51-59

code


import React from 'react';
import Slider from "react-slick";

const Brand = () => {
  const settings = {
    dots: false,
    arrows: false,
    // centerMode: true,
    infinite: true,
    slidesToShow: 4,
    slidesToScroll: 4,
    // autoplay: true,
    speed: 3000,
    autoplaySpeed: 1000,
    draggable: true,
    responsive: [
      {
        breakpoint: 600,
        settings: {
          slidesToShow: 3,
        }
      },
      {
        breakpoint: 480,
        settings: {
          slidesToShow: 2,
        }
      }
    ]
  };
  return (
    <div>
      <Slider {...settings}>
        <div>
          <h3>1</h3>
        </div>
        <div>
          <h3>2</h3>
        </div>
        <div>
          <h3>3</h3>
        </div>
        <div>
          <h3>4</h3>
        </div>
        <div>
          <h3>5</h3>
        </div>
        <div>
          <h3>6</h3>
        </div>
        <div>
          <h3>7</h3>
        </div>
      </Slider>
    </div>
  )
}

export { Brand as default }

Please help me in solving this issue.

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