diff --git a/components/cascader/__tests__/__snapshots__/index.test.js.snap b/components/cascader/__tests__/__snapshots__/index.test.js.snap index ee54ee84ab..2c46bbdb26 100644 --- a/components/cascader/__tests__/__snapshots__/index.test.js.snap +++ b/components/cascader/__tests__/__snapshots__/index.test.js.snap @@ -608,7 +608,7 @@ exports[`Cascader have a notFoundContent that fit trigger input width 1`] = ` class="ant-cascader-menu" >
  • { { [names.label]: notFoundContent || renderEmpty('Cascader'), [names.value]: 'ANT_CASCADER_NOT_FOUND', - disabled: true, }, ]; } @@ -610,8 +609,10 @@ class Cascader extends React.Component { const getPopupContainer = props.getPopupContainer || getContextPopupContainer; const rest = omit(props, ['inputIcon', 'expandIcon', 'loadingIcon', 'bordered']); - const rcCascaderRtlPopupClassName = classNames(popupClassName, { + const rcCascaderPopupClassName = classNames(popupClassName, { [`${prefixCls}-menu-${direction}`]: direction === 'rtl', + [`${prefixCls}-menu-empty`]: + options.length === 1 && options[0].value === 'ANT_CASCADER_NOT_FOUND', }); return ( { dropdownMenuColumnStyle={dropdownMenuColumnStyle} expandIcon={expandIcon} loadingIcon={loadingIcon} - popupClassName={rcCascaderRtlPopupClassName} + popupClassName={rcCascaderPopupClassName} popupPlacement={this.getPopupPlacement(direction)} > {input} diff --git a/components/cascader/style/index.less b/components/cascader/style/index.less index 9c4d35d929..67bd66b9b1 100644 --- a/components/cascader/style/index.less +++ b/components/cascader/style/index.less @@ -204,6 +204,11 @@ background: transparent; } } + .@{cascader-prefix-cls}-menu-empty & { + color: @disabled-color; + cursor: default; + pointer-events: none; + } &-active:not(&-disabled) { &, &:hover { diff --git a/components/config-provider/__tests__/__snapshots__/components.test.js.snap b/components/config-provider/__tests__/__snapshots__/components.test.js.snap index 1897b42af5..ef7923c45e 100644 --- a/components/config-provider/__tests__/__snapshots__/components.test.js.snap +++ b/components/config-provider/__tests__/__snapshots__/components.test.js.snap @@ -19481,7 +19481,7 @@ exports[`ConfigProvider components Table configProvider 1`] = ` class="config-spin-container" >
    (props: TableProps) { [`${prefixCls}-middle`]: mergedSize === 'middle', [`${prefixCls}-small`]: mergedSize === 'small', [`${prefixCls}-bordered`]: bordered, + [`${prefixCls}-empty`]: rawData.length === 0, })} data={pageData} rowKey={getRowKey} diff --git a/components/table/__tests__/__snapshots__/Table.test.js.snap b/components/table/__tests__/__snapshots__/Table.test.js.snap index ce68fa0b51..2635f6934b 100644 --- a/components/table/__tests__/__snapshots__/Table.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.test.js.snap @@ -117,7 +117,7 @@ exports[`Table rtl render component should be rendered correctly in RTL directio class="ant-spin-container" >
    tr&-placeholder { text-align: center; + .@{table-prefix-cls}-empty & { + color: @disabled-color; + } &:hover { > td { background: @component-background;