fix: Table dropdown prefix cls (#22133)

* fix: Table dropdownPrefixCls

* update snapshot

* update snapshot
This commit is contained in:
二货机器人 2020-03-11 23:58:32 +08:00 committed by GitHub
parent 7ec2b771d4
commit f44f6f38cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 8 deletions

View File

@ -11764,11 +11764,11 @@ exports[`ConfigProvider components Table configProvider 1`] = `
class="config-table-filter-dropdown"
>
<ul
class="ant-dropdown-menu ant-dropdown-menu-light ant-dropdown-menu-root ant-dropdown-menu-vertical"
class="config-dropdown-menu config-dropdown-menu-light config-dropdown-menu-root config-dropdown-menu-vertical"
role="menu"
>
<li
class="ant-dropdown-menu-item"
class="config-dropdown-menu-item"
role="menuitem"
>
<label
@ -11791,19 +11791,19 @@ exports[`ConfigProvider components Table configProvider 1`] = `
</span>
</li>
<li
class="ant-dropdown-menu-submenu ant-dropdown-menu-submenu-vertical"
class="config-dropdown-menu-submenu config-dropdown-menu-submenu-vertical"
role="menuitem"
>
<div
aria-expanded="false"
aria-haspopup="true"
class="ant-dropdown-menu-submenu-title"
class="config-dropdown-menu-submenu-title"
role="button"
title="Submenu"
>
Submenu
<i
class="ant-dropdown-menu-submenu-arrow"
class="config-dropdown-menu-submenu-arrow"
/>
</div>
</li>

View File

@ -88,7 +88,7 @@ function Table<RecordType extends object = any>(props: TableProps<RecordType>) {
style,
size: customizeSize,
bordered,
dropdownPrefixCls,
dropdownPrefixCls: customizeDropdownPrefixCls,
dataSource,
pagination,
rowSelection,
@ -122,6 +122,7 @@ function Table<RecordType extends object = any>(props: TableProps<RecordType>) {
const { getPrefixCls } = React.useContext(ConfigContext);
const prefixCls = getPrefixCls('table', customizePrefixCls);
const dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls);
const mergedExpandable: ExpandableConfig<RecordType> = {
expandIconColumnIndex,

View File

@ -160,7 +160,7 @@ export function getFilterData<RecordType>(
interface FilterConfig<RecordType> {
prefixCls: string;
dropdownPrefixCls?: string;
dropdownPrefixCls: string;
columns: ColumnsType<RecordType>;
locale: TableLocale;
onFilterChange: (
@ -172,7 +172,7 @@ interface FilterConfig<RecordType> {
function useFilter<RecordType>({
prefixCls,
dropdownPrefixCls = 'ant-dropdown',
dropdownPrefixCls,
columns,
onFilterChange,
getPopupContainer,