React-select: Options list breaks across columns when used in CSS multi-column container (Chrome)

Created on 24 May 2018  路  4Comments  路  Source: JedWatson/react-select

If a ReactSelect component is used in a container that uses a CSS multi-column layout (by using one of the following css properties: column-width or column-count) the options list breaks into the next column. From what I've seen, using a combo of different CSS properties related to break-inside: avoid should avoid breaks inside of a group of elements across columns. However, this doesn't seem to be the case for elements that use position: absolute; as is the case for the .Select-menu-outer options list.

To see the issue open the plunk below and run it with the screen width set so the select elements are spread across 2 columns. Then open the second or third select in the first column. You'll see the dropdown menu breaks into the second column (as seen in the screen shot below):
image

https://plnkr.co/edit/DezK1BwsSvwVVyBLBjkV?p=preview

Most helpful comment

All 4 comments

This is also an issue with V2 BTW.

@jbgarr this sounds like a bug with the consumer styles applied to the component and its surrounds, rather than the component itself.

I am having a similar issue where if I put react-select component inside a div that has column-count on it, the react-select component will not display the selected item.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AchinthaReemal picture AchinthaReemal  路  3Comments

juliensnz picture juliensnz  路  3Comments

geraldfullam picture geraldfullam  路  3Comments

steida picture steida  路  3Comments

mbonaci picture mbonaci  路  3Comments