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.

43 lines
894 B

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