refactor(Dropdown): Migrate Dropdown to Ant Design 5 (#31972)

This commit is contained in:
Mehmet Salih Yavuz
2025-02-07 20:38:04 +03:00
committed by GitHub
parent 38c46fcafd
commit bcc61bd933
71 changed files with 1137 additions and 1576 deletions

View File

@@ -30,11 +30,8 @@ import {
import AutoSizer from 'react-virtualized-auto-sizer';
import Icons from 'src/components/Icons';
import type { SqlLabRootState } from 'src/SqlLab/types';
import {
Skeleton,
AntdBreadcrumb as Breadcrumb,
AntdDropdown,
} from 'src/components';
import { Skeleton, AntdBreadcrumb as Breadcrumb } from 'src/components';
import { Dropdown } from 'src/components/Dropdown';
import FilterableTable from 'src/components/FilterableTable';
import Tabs from 'src/components/Tabs';
import {
@@ -308,8 +305,8 @@ const TablePreview: FC<Props> = ({ dbId, catalog, schema, tableName }) => {
<Title>
<Icons.Table iconSize="l" />
{tableName}
<AntdDropdown
overlay={
<Dropdown
dropdownRender={() => (
<Menu
onClick={({ key }) => {
if (key === 'refresh-table') {
@@ -324,7 +321,7 @@ const TablePreview: FC<Props> = ({ dbId, catalog, schema, tableName }) => {
}}
items={dropdownMenu}
/>
}
)}
trigger={['click']}
>
<Icons.DownSquareOutlined
@@ -332,7 +329,7 @@ const TablePreview: FC<Props> = ({ dbId, catalog, schema, tableName }) => {
style={{ marginTop: 2, marginLeft: 4 }}
aria-label={t('Table actions')}
/>
</AntdDropdown>
</Dropdown>
</Title>
{isMetadataRefreshing ? (
<Skeleton active />