question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

banners are superimposed on each other

See original GitHub issue

My carousel in the dropdown menu;

By default, the drop-down menu is closed. Slides are loaded at this point. When you open the drop-down menu, the slides are superimposed on each other. If you open the drop-down menu, the slides work correctly <div class="slick-slide slick-cloned" data-index="-1" style="width: 0px;">....</div>

Why react-slick set width: 0px;?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
laveesinghcommented, Mar 21, 2018

That can’t be right. I did the following with dev branch:

  • ran a build with yarn prepublish
  • ran yarn link to use it in another test repo
  • used the following snippet:
import React, { Component } from 'react';
import './App.css';
import Slider from 'react-slick'

class App extends Component {

  state = { display: 'block' }
  render() {
    const settings = {
      slidesToShow: 4,
      slidesToScroll: 4,
    }
    return (
      <div className='content'>
        <button onClick={() => {
          if (this.state.display === 'block')
            this.setState({ display: 'none' })
          else this.setState({ display: 'block' })
        }}>toggle</button>
        <div style={{ display: this.state.display }}>
          <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>
      </div>
    );
  }
}

export default App;

And it produced the following results: collapsed slider demo2

Can you check latest commits in dev on the repo against your local dev branch to make sure you have the latest changes?

1reaction
astranavtcommented, Mar 20, 2018

I clone the repository, select the dev branch and run the npm run prepublish command, then I build my project with building components and see the same problem. And if variableWidth=true, then all works. this solution also works on release 0.21.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Design shape Origami vector banner. The original form as two ...
Download Design shape Origami vector banner. The original form as two rectangles superimposed on each other. The flat image. Vector graphics Stock Vector ......
Read more >
Clem's Baseball ~ Stadiums superimposed
This page allows you to directly compare any two stadiums at the same time by superimposing their diagrams on top of one another....
Read more >
Service Banners: What Do They Mean? - Soldiers' Angels
Other Military Service Banners · Blue star with a gold Greek cross in the center = ”wounded in service” · Blue star with...
Read more >
Banner - The Digital Marketing Wiki - Ryte
Layers: A layer is superimposed on the website. It is often displayed as a Flash animation, which remains visible even if the user...
Read more >
Glass dialog bubbles vector banner green and blue ... - Freepik
Download this Premium Vector about Glass dialog bubbles vector banner green and blue transparent colloquial comma superimposed on each other, and discover ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found