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组件显示值而非描述 #50

Closed
dqaria opened this issue Jul 17, 2015 · 7 comments
Closed

select组件显示值而非描述 #50

dqaria opened this issue Jul 17, 2015 · 7 comments
Labels
🐛 Bug Ant Design Team had proved that this is a bug. 🗣 Discussion

Comments

@dqaria
Copy link
Contributor

dqaria commented Jul 17, 2015


建议默认显示描述,或者提供配置项

@yiminghe
Copy link
Contributor

是否暴露 optionLabelProp ?

http://react-component.github.io/select/examples/force-suggest.html

@dqaria
Copy link
Contributor Author

dqaria commented Jul 21, 2015

配置optionLabelProp="children"后显示正常,但感觉默认显示label内容比较合理

@afc163
Copy link
Member

afc163 commented Jul 22, 2015

确实默认显示 label 较合理。

@yiminghe
Copy link
Contributor

这个变更不兼容了,目前首页search 组件点击后,input 内容是 [object]

@yiminghe yiminghe reopened this Jul 22, 2015
@afc163
Copy link
Member

afc163 commented Jul 22, 2015

这里 修复了这个问题。

但问题的实质是 search 搜索原生输入框的 inputValue 无法接受 React.Element 的值(而 select 本身是可以的)。https://github.com/react-component/select/blob/a05ac8e2809fa19e197d82624186dbde1144a14d/src/Select.jsx#L211

是否在 optionLabelProp="children" 的情况下转成 text ?

@yiminghe
Copy link
Contributor

这个不合理,不应该转啊,用户应该自己选择,下拉只是一个展示而已,真实 input 的值需要指定

@afc163 afc163 added the 🐛 Bug Ant Design Team had proved that this is a bug. label Jul 24, 2015
@lock
Copy link

lock bot commented May 7, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 Bug Ant Design Team had proved that this is a bug. 🗣 Discussion
Projects
None yet
Development

No branches or pull requests

3 participants