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

Responsive settings not working in functional component #2264

Open
guilherme-dsveiga opened this issue Aug 2, 2023 · 0 comments
Open

Responsive settings not working in functional component #2264

guilherme-dsveiga opened this issue Aug 2, 2023 · 0 comments

Comments

@guilherme-dsveiga
Copy link

I'm using these settings in a functional component:

const sliderSettings: Settings = {
      dots: false,
      infinite: true,
      slidesToScroll: 1,
      draggable: true,

      responsive: [
        {
          breakpoint: 1080,
          settings: {
            slidesToShow: 1,
          },
        },
        {
          breakpoint: 1480,
          settings: {
            slidesToShow: 2,
          },
        },
        {
          breakpoint: 1800,
          settings: {
            slidesToShow: 3,
          },
        },
      ],
    };

This is not working, however when changing my component to a class-based one, it does seem to work

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