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
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:
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;
}