You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
935 B

import React from 'react';
import Select from 'rc-select';
let AntSelect = React.createClass({
getDefaultProps() {
10 years ago
return {
10 years ago
prefixCls: 'ant-select',
transitionName: 'slide-up',
optionLabelProp: 'children',
showSearch: false,
size: 'default'
10 years ago
};
},
render() {
const {size, className, combobox, notFoundContent} = this.props;
let sizeClass = null;
if (size === 'large') {
sizeClass = 'ant-select-lg';
} else if (size === 'small') {
sizeClass = 'ant-select-sm';
}
const classNames = [];
if (className) {
classNames.push(className);
}
if (sizeClass) {
classNames.push(sizeClass);
}
10 years ago
return (
<Select {...this.props} className={classNames.join(' ')} notFoundContent={combobox ? null : notFoundContent} />
10 years ago
);
}
});
9 years ago
AntSelect.Option = Select.Option;
9 years ago
AntSelect.OptGroup = Select.OptGroup;
9 years ago
export default AntSelect;