Ant-design: Control Cascader height of drop down

Created on 29 Aug 2017  ·  4Comments  ·  Source: ant-design/ant-design

Version

2.12.8

Environment

chrome node react-web 15.5.4

Reproduction link

https://codepen.io/edencorbin/pen/WEamZa?editors=0010

Steps to reproduce

Create a cascader with more then ~6 options. How can we control the height of the drop down so that more options are shown prior to the scroll bar interface?

What is expected?

Option to set how many items are shown prior to scroll, or a pixel height the drop down should be. I did not see this in the docs. A standard select usually auto sizes via the browser to try to show all options.

What is actually happening?

5-6 options are displayed and the rest are accessible via a scrollbar.


If I didn't see the option, thank you for your time pointing it out.

Most helpful comment

You can customize the style of the popup container(and the content) by adding popupClassName.

.popupClassName {
  .ant-cascader-menu {
    height: xxx
  }
}

All 4 comments

You can customize the style of the popup container(and the content) by adding popupClassName.

.popupClassName {
  .ant-cascader-menu {
    height: xxx
  }
}

Control Cascader height of drop down 下拉样式无法控制,组件没有提供方法

@ddcat1115

提供的style无法控制到下拉样式

Was this page helpful?
0 / 5 - 0 ratings

Related issues

longhuasishen picture longhuasishen  ·  3Comments

mineralres picture mineralres  ·  3Comments

lifeneedspassion picture lifeneedspassion  ·  3Comments

alanwei0 picture alanwei0  ·  3Comments

xtznhzxdev picture xtznhzxdev  ·  3Comments