How to set the length of an dropdown menu? #754
-
Hello there, we tried different ways to set the length of the select for countries and cities, i.e. with maxMenuHeight={10} (like you see in the code with the Country) or with some functions like here. Unfortunately it doesn't work.
Here is the PR Maybe you have an idea, how we can set the length? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hey, you could either get a certain amount of entries from your database (check out this) or manually shorten your both will get you a shorter optionsMenue. Depending on the Main goal and how you use it, its better to use one ore the other. Try to discuss in your group which one will be best. hope that helps |
Beta Was this translation helpful? Give feedback.
-
The answer is to use a library, i.e. react-select, for the select elements. We can't manipulate the default settings of the browser, in this case, to change the appearance of the menu. |
Beta Was this translation helpful? Give feedback.
-
great, that would been my suggestion. The value you want to tackle for the height of the container is very much dependent from the browser and therefor not so easy to cover all of them. The library should work, great pick. |
Beta Was this translation helpful? Give feedback.
The answer is to use a library, i.e. react-select, for the select elements. We can't manipulate the default settings of the browser, in this case, to change the appearance of the menu.