mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
update combobox optionLabelProp to value (#1579)
This commit is contained in:
parent
7ba53e77d2
commit
a5a79ceebf
@ -16,7 +16,7 @@ export default class Select extends React.Component {
|
||||
|
||||
render() {
|
||||
let {
|
||||
size, className, combobox, notFoundContent, prefixCls, showSearch,
|
||||
size, className, combobox, notFoundContent, prefixCls, showSearch, optionLabelProp,
|
||||
} = this.props;
|
||||
|
||||
const cls = classNames({
|
||||
@ -28,11 +28,14 @@ export default class Select extends React.Component {
|
||||
|
||||
if (combobox) {
|
||||
notFoundContent = null;
|
||||
// children 带 dom 结构时,无法填入输入框
|
||||
optionLabelProp = 'value';
|
||||
}
|
||||
|
||||
return (
|
||||
<RcSelect {...this.props}
|
||||
className={cls}
|
||||
optionLabelProp={optionLabelProp}
|
||||
notFoundContent={notFoundContent} />
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user