Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select的option全部显示不要滚动条 #16580

Closed
1 task
vuvivian opened this issue May 14, 2019 · 4 comments
Closed
1 task

select的option全部显示不要滚动条 #16580

vuvivian opened this issue May 14, 2019 · 4 comments

Comments

@vuvivian
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

http://localhost:8080/businessmodel

Steps to reproduce

由于下拉菜单的选项过多(有16个),Select在下拉菜单中使用了滚动条。但是我当前的需求是需要显示全部选项,去掉滚动条。
代码如下:

<Select>
           <Option value="01">01</Option>
           <Option value="02">02</Option>
           <Option value="03">03</Option>
           <Option value="04">04</Option>
           <Option value="05">05</Option>
           <Option value="06">06</Option>
           <Option value="07">07</Option>
           <Option value="08">08</Option>
           <Option value="09">09</Option>
           <Option value="10">10</Option>
           <Option value="11">11</Option>
           <Option value="12">12</Option>
           <Option value="13">13</Option>
           <Option value="14">14</Option>
           <Option value="15">15</Option>
           <Option value="16">16</Option>
   </Select>

What is expected?

显示全部option,去掉滚动条

What is actually happening?

存在滚动条
image

Environment Info
antd 3.10.3
React 15.4.2
System windows
Browser google
@MrHeer
Copy link
Contributor

MrHeer commented May 14, 2019

Are you sure this can reproduction?

http://localhost:8080/businessmodel

@vuvivian
Copy link
Author

Are you sure this can reproduction?

http://localhost:8080/businessmodel

抱歉放错了地址,详情请看https://n72px53n20.codesandbox.io/

@MrHeer
Copy link
Contributor

MrHeer commented May 14, 2019

You can try to modify the style

.ant-select-dropdown-menu {
-    max-height: 250px;
+    max-height: fit-content;
}

@vuvivian
Copy link
Author

You can try to overwrite the style

.ant-select-dropdown-menu {
    max-height: fit-content;
}

OK . Thank you ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants