mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
fix className concat
This commit is contained in:
parent
8a62a4d009
commit
0c3432fd35
@ -12,19 +12,25 @@ let AntSelect = React.createClass({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
let sizeClass = '';
|
const {size, className, combobox, notFoundContent} = this.props;
|
||||||
if (this.props.size === 'large') {
|
|
||||||
|
let sizeClass = null;
|
||||||
|
if (size === 'large') {
|
||||||
sizeClass = 'ant-select-lg';
|
sizeClass = 'ant-select-lg';
|
||||||
} else if (this.props.size === 'small') {
|
} else if (size === 'small') {
|
||||||
sizeClass = 'ant-select-sm';
|
sizeClass = 'ant-select-sm';
|
||||||
}
|
}
|
||||||
let className = this.props.className || ' ';
|
|
||||||
let notFoundContent = this.props.notFoundContent;
|
const classNames = [];
|
||||||
if (this.props.combobox) {
|
|
||||||
notFoundContent = null;
|
if (className) {
|
||||||
|
classNames.push(className);
|
||||||
|
}
|
||||||
|
if (sizeClass) {
|
||||||
|
classNames.push(sizeClass);
|
||||||
}
|
}
|
||||||
return (
|
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