react-select icon indicating copy to clipboard operation
react-select copied to clipboard

Make it easier for users to realise that there are more options that are not displayed

Open DeeLindesay opened this issue 9 years ago • 4 comments

Is there any way of customising the number of items displayed and/or could we update the display to show 1/2 the next item in the list when not all items can be displayed?

One of our select boxes currently has 6 options, but the drop down, by default, seems to show exactly 5 options in the window (requiring users to scroll to the sixth). This leads our users to assume the sixth option is just not available.

I can't find anything in the documentation about this and I did try stack overflow two months ago but have not had any responses

DeeLindesay avatar Apr 12 '17 15:04 DeeLindesay

I'm not sure on how to change the size of the popup that opens, but maybe you could try to render the items yourself. For example, if the popup that opens has a height of 200px, have your item rendering function create items with a height of 30px, or something like that.. If it works then its a total workaround but might help you for now.

Also, there are menuStyle and menuContainerStyle. Maybe they might help - set maxHeight to something else that you want.

slavab89 avatar Apr 17 '17 18:04 slavab89

@DeeLindesay Change max-height of .Select-menu-outer and it's child .Select-menu

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

https://github.com/JedWatson/react-select/issues/704#issuecomment-277397618

q3e avatar Jun 17 '18 07:06 q3e

https://github.com/JedWatson/react-select/issues/1322

Using customStyles worked for me like mentioned in the above examples but container reflects the whole dropdown box which did not worked. What worked was using minHeight to control size of dropdown:

const customStyles = {
        menuList: base => ({
            ...base,
            minHeight: 'fit-content',
        }),
};

shubhankar30 avatar Nov 15 '18 03:11 shubhankar30

Hello -

In an effort to sustain the react-select project going forward, we're closing old issues.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our efforts towards the current major version.

If you aren't using the latest version of react-select please consider upgrading to see if it resolves any issues you're having.

However, if you feel this issue is still relevant and you'd like us to review it - please leave a comment and we'll do our best to get back to you!

bladey avatar May 28 '20 03:05 bladey