React-select: Height of dropdow

Created on 11 Jan 2016  路  5Comments  路  Source: JedWatson/react-select

Hey folks,

I'm trying to control the height of the dropdown, I'd like to use a small dropdown.
I found on README this menuBuffer, but din't work.

I solved this with CSS, see:

.Select-menu-outer * {
  max-height: 95px;
}

I know, this is a mistake.
Please, any idea?

Tks

Most helpful comment

You can also override these two classes in your CSS file for the component:

.Select-menu-outer {
max-height: 1000px;
}

.Select-menu {
max-height: 998px;
}

All 5 comments

Check out this issue: https://github.com/JedWatson/react-select/issues/316

You can import the base less file then override the heigh variable:

(using webpack)

@import '~react-select/less/select';
@select-menu-max-height:           400px;

Thanks @dshook @andrerpena
I am confused how this will fit into my project. Do I create my own custom .less file, put this code in it and link it as a less stylesheet? Do I need to compile it at all?

I'm just trying to understand how this all fits in.

Ever get the answer to that last question? I'm trying to figure out the same as well.

You can also override these two classes in your CSS file for the component:

.Select-menu-outer {
max-height: 1000px;
}

.Select-menu {
max-height: 998px;
}

Version 1 of react-select is no longer supported.

In the best interest of the community we've decided to spend the time we have available on the latest version.

We apologise for any inconvenience.

Please see:

  1. v1 to v2 upgrade guide
  2. v1 documentation and examples
Was this page helpful?
0 / 5 - 0 ratings

Related issues

juliensnz picture juliensnz  路  3Comments

mbonaci picture mbonaci  路  3Comments

MalcolmDwyer picture MalcolmDwyer  路  3Comments

pashap picture pashap  路  3Comments

geraldfullam picture geraldfullam  路  3Comments