From 3dbd8f5d31121c4090dcfd297b87fe00aa9aece0 Mon Sep 17 00:00:00 2001 From: twwu Date: Thu, 12 Dec 2024 17:14:33 +0800 Subject: [PATCH] feat: enhance child segment list with total count and input value handling --- .../detail/completed/child-segment-list.tsx | 16 ++++++++++++---- .../documents/detail/completed/index.tsx | 13 ++++++++----- .../documents/detail/completed/segment-card.tsx | 2 +- .../formatted-text/flavours/edit-slice.tsx | 8 ++------ 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx b/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx index 34cbd1c96e..c1f44648fb 100644 --- a/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx +++ b/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx @@ -15,6 +15,8 @@ type IChildSegmentCardProps = { enabled: boolean onDelete?: (segId: string, childChunkId: string) => Promise onClickSlice?: (childChunk: ChildChunkDetail) => void + total?: number + inputValue?: string } const ChildSegmentList: FC = ({ @@ -25,6 +27,8 @@ const ChildSegmentList: FC = ({ enabled, onDelete, onClickSlice, + total, + inputValue, }) => { const parentMode = useDocumentContext(s => s.parentMode) @@ -63,7 +67,7 @@ const ChildSegmentList: FC = ({ : () : null } - {`${childChunks.length} CHILD CHUNKS`} + {`${total} CHILD CHUNKS`} ·