mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 21:19:37 +08:00
fix className concat
This commit is contained in:
parent
8a62a4d009
commit
0c3432fd35
@ -12,19 +12,25 @@ let AntSelect = React.createClass({
|
||||
};
|
||||
},
|
||||
render() {
|
||||
let sizeClass = '';
|
||||
if (this.props.size === 'large') {
|
||||
const {size, className, combobox, notFoundContent} = this.props;
|
||||
|
||||
let sizeClass = null;
|
||||
if (size === 'large') {
|
||||
sizeClass = 'ant-select-lg';
|
||||
} else if (this.props.size === 'small') {
|
||||
} else if (size === 'small') {
|
||||
sizeClass = 'ant-select-sm';
|
||||
}
|
||||
let className = this.props.className || ' ';
|
||||
let notFoundContent = this.props.notFoundContent;
|
||||
if (this.props.combobox) {
|
||||
notFoundContent = null;
|
||||
|
||||
const classNames = [];
|
||||
|
||||
if (className) {
|
||||
classNames.push(className);
|
||||
}
|
||||
if (sizeClass) {
|
||||
classNames.push(sizeClass);
|
||||
}
|
||||
return (
|
||||
<Select {...this.props} className={className + sizeClass} notFoundContent={notFoundContent} />
|
||||
<Select {...this.props} className={classNames.join(' ')} notFoundContent={combobox ? null : notFoundContent} />
|
||||
);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user