Fix: Optimize the metadata code structure to implement metadata list structure functionality. (#12741)

### What problem does this PR solve?

Fix: Optimize the metadata code structure to implement metadata list
structure functionality.

#11564

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2026-01-21 16:15:43 +08:00
committed by GitHub
parent e1143d40bc
commit 83e17d8c4a
13 changed files with 315 additions and 251 deletions

View File

@ -1,7 +1,7 @@
import { Button } from '@/components/ui/button';
import { Checkbox } from '@/components/ui/checkbox';
import { Input } from '@/components/ui/input';
import { ColumnDef } from '@tanstack/react-table';
import { ColumnDef, Row, Table } from '@tanstack/react-table';
import {
ListChevronsDownUp,
ListChevronsUpDown,
@ -14,7 +14,7 @@ import {
getMetadataValueTypeLabel,
MetadataDeleteMap,
MetadataType,
} from './hooks/use-manage-modal';
} from './constant';
import { IMetaDataTableData } from './interface';
interface IUseMetadataColumns {
@ -102,7 +102,7 @@ export const useMetadataColumns = ({
? [
{
id: 'select',
header: ({ table }) => (
header: ({ table }: { table: Table<IMetaDataTableData> }) => (
<Checkbox
checked={
table.getIsAllPageRowsSelected() ||
@ -114,7 +114,7 @@ export const useMetadataColumns = ({
aria-label="Select all"
/>
),
cell: ({ row }) => (
cell: ({ row }: { row: Row<IMetaDataTableData> }) => (
<Checkbox
checked={row.getIsSelected()}
onCheckedChange={(value) => row.toggleSelected(!!value)}