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.

39 lines
863 B

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