mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-04 17:45:07 +08:00
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:
@ -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)}
|
||||
|
||||
Reference in New Issue
Block a user