From 7200dd42d33f909ebfa6b83f092e4b6542202863 Mon Sep 17 00:00:00 2001 From: twwu Date: Thu, 5 Dec 2024 09:49:37 +0800 Subject: [PATCH] refactor: update batch action component props and change id type in ChildChunkDetail --- .../documents/detail/completed/batch-action.tsx | 11 +++++++---- web/models/datasets.ts | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/web/app/components/datasets/documents/detail/completed/batch-action.tsx b/web/app/components/datasets/documents/detail/completed/batch-action.tsx index 3bed21df96..7a55784e70 100644 --- a/web/app/components/datasets/documents/detail/completed/batch-action.tsx +++ b/web/app/components/datasets/documents/detail/completed/batch-action.tsx @@ -1,9 +1,11 @@ import React, { type FC } from 'react' import { RiCheckboxCircleLine, RiCloseCircleLine, RiDeleteBinLine } from '@remixicon/react' import Divider from '@/app/components/base/divider' +import classNames from '@/utils/classnames' type IBatchActionProps = { - selectedSegmentIds: string[] + className?: string + selectedIds: string[] onBatchEnable: () => Promise onBatchDisable: () => Promise onBatchDelete: () => Promise @@ -11,18 +13,19 @@ type IBatchActionProps = { } const BatchAction: FC = ({ - selectedSegmentIds, + className, + selectedIds, onBatchEnable, onBatchDisable, onBatchDelete, onCancel, }) => { return ( -
+
- {selectedSegmentIds.length} + {selectedIds.length} Selected
diff --git a/web/models/datasets.ts b/web/models/datasets.ts index ed4ab2fb7d..c2bdedaf62 100644 --- a/web/models/datasets.ts +++ b/web/models/datasets.ts @@ -591,7 +591,7 @@ export const DEFAULT_WEIGHTED_SCORE = { export type ChildChunkType = 'automatic' | 'customized' export type ChildChunkDetail = { - id: number + id: string position: number segment_id: string content: string