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

Fix unslick missing children element #1652

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

monthas
Copy link

@monthas monthas commented Oct 11, 2019

1. When set unslick the children element went missing so use variable children to render from given children instead of newChildren.

Before

Screen Shot 2019-10-11 at 3 15 21 PM

2. Change div to span because it fixed element doesn't load properly on the breakpoint that set unslick (Don't know the root cause but it works like a charm.)

Before

Screen Shot 2019-10-11 at 3 10 50 PM

After

Screen Shot 2019-10-11 at 3 12 24 PM

Example settings

  var settings = {
      infinite: false,
      speed: 500,
      slidesToShow: 5,
      slidesToScroll: 1,
      responsive: [
        {
          breakpoint: 480,
          settings: {
            centerMode: true,
            slidesToShow: 2,
            slidesToScroll: 1,
            infinite: true
          },
        }, {
          breakpoint: 10000,
          settings: 'unslick'
        }
      ]
  }

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

Successfully merging this pull request may close these issues.

None yet

1 participant