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

problem with responsive when mounting the component #2333

Open
lucaspieran opened this issue Jan 26, 2024 · 2 comments
Open

problem with responsive when mounting the component #2333

lucaspieran opened this issue Jan 26, 2024 · 2 comments

Comments

@lucaspieran
Copy link

When im in responsive mode this add a translate x value in slick-list and should be 0

  const settings = {
    slidesToShow: 5,
    slidesToScroll: 1,
    speed: 500,
    arrows: false,
    infinite: false,
    responsive: [
      {
        breakpoint: 1300,
        settings: {
          slidesToShow: 2,
          slidesToScroll: 1,
        },
      },
      {
        breakpoint: 1600,
        settings: {
          slidesToShow: 3,
          slidesToScroll: 1,
        },
      },
    ],
  }

image

only after touching next or prev does it look good
image

@mikosenpl
Copy link

mikosenpl commented Jan 31, 2024

I have the same problem, my settings (The problem is not caused by the sliderToShow type other than Integer)

  const settings = {
    slidesToShow: 4,
    slidesToScroll: 1,
    accessibility: true,
    infinite: false,
    nextArrow: <NextArrow />,
    prevArrow: <PreviousArrow />,
    responsive: [
      {
        breakpoint: 1024,
        settings: {
          slidesToShow: 3.2,
          slidesToScroll: 3,
        },
      },
      {
        breakpoint: 600,
        settings: {
          slidesToShow: 2.2,
          slidesToScroll: 1,
          dots: true,
        },
      },
      {
        breakpoint: 480,
        settings: {
          slidesToShow: 1.2,
          slidesToScroll: 1,
          dots: true,
        },
      },
    ]}

@jui9266
Copy link

jui9266 commented Feb 6, 2024

Hi, I think it is because you render slider before data is fetched. How about rendering slider when you have data?

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

3 participants