Ant-design: Select component not displaying options as expected.

Created on 18 Oct 2016  ·  3Comments  ·  Source: ant-design/ant-design

I have just started using your awesome framework and had a question aroung the select component. I have a case where the text in the options is longer than the width of the drop down. This results in strange behavior. Please see the screenshots and codepen below

Codepen for antd implementation
Codepen default html implementation

If you compare the two selects you can see I have added an option with text that is greater than the width of the select. I would have expected the full text to be visible when the options are displayed. I can't see anything in the documentation around enabling this. There is also a strange piece of behaviour that displays the full text of the currently selected item when changing the select option.

Is the component intended to work this way?

Thanks.

Most helpful comment

Did all of the suggestions before posting an issue. I am not here to waste your or my time. Next time I will spend more time reading the documentation more carefully. Apologies!

All 3 comments

https://ant.design/components/select/#Select-props

dropdownMatchSelectWidth={false}

Please read documentation & FAQ and search issues before open an issue, THX!

It will be better if you read smart questions(提问的智慧).

Did all of the suggestions before posting an issue. I am not here to waste your or my time. Next time I will spend more time reading the documentation more carefully. Apologies!

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shivekkhurana picture shivekkhurana  ·  3Comments

lifeneedspassion picture lifeneedspassion  ·  3Comments

tianyacsdn picture tianyacsdn  ·  3Comments

zhangchen2397 picture zhangchen2397  ·  3Comments

PeteAndersen picture PeteAndersen  ·  3Comments