React-slick: Giant width within flex container

Created on 2 Sep 2020  路  4Comments  路  Source: akiran/react-slick

It's quite simple, and straightforward.

I don't know if someone else reported this, I've looked within some issues but didn't found something related.

I've modified the base sandbox and here is the link: https://codesandbox.io/s/react-slick-playground-forked-dnc0n

It also happens inside children of flex elements.

Came around this while trying to use it in some projects of mine, below is the picture of what happened.

More info:
react-slick version: 0.26 (on my projects, default on the sandbox)
browser: Firefox 80.0.1 (64-bits)

image

Most helpful comment

Here's how I solved it
```jsx

~~~

````

All 4 comments

Found a quick-fix for the children of flex-based elements. Applying max-width: 100%; to a non-flex child of a flex container seemed to work for me.

In the above sandbox, I've created a div inside .container and applied .container > div {max-width:100%;}

@Diegovisk came across your issue because聽I the same. Setting flex-direction: column on the container will prevent the unwieldy overflow. Hope it helps!

Here's how I solved it
```jsx

~~~

````

@liaokaime , you saved my day!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

slashwhatever picture slashwhatever  路  3Comments

darkalor picture darkalor  路  4Comments

PolGuixe picture PolGuixe  路  3Comments

walker-jiang picture walker-jiang  路  3Comments

laveesingh picture laveesingh  路  3Comments