fix: Cascader duplicated className (#27187)

close #27168
This commit is contained in:
Yu Mao 2020-10-16 02:48:23 -05:00 committed by GitHub
parent 77e7eceb91
commit b4e748c28a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -642,12 +642,19 @@ class Cascader extends React.Component<CascaderProps, CascaderState> {
);
const getPopupContainer = props.getPopupContainer || getContextPopupContainer;
const rest = omit(props, ['inputIcon', 'expandIcon', 'loadingIcon', 'bordered']);
const rest = omit(props, [
'inputIcon',
'expandIcon',
'loadingIcon',
'bordered',
'className',
]);
const rcCascaderPopupClassName = classNames(popupClassName, {
[`${prefixCls}-menu-${direction}`]: direction === 'rtl',
[`${prefixCls}-menu-empty`]:
options.length === 1 && options[0].value === 'ANT_CASCADER_NOT_FOUND',
});
return (
<RcCascader
{...rest}