From a430284aa21e3ae1f0d5654e55b2ad2852519cc2 Mon Sep 17 00:00:00 2001
From: wwf <yearningwang@iqtogether.com>
Date: 星期三, 04 六月 2025 15:17:49 +0800
Subject: [PATCH] 初始化

---
 app/components/workflow/nodes/question-classifier/components/class-list.tsx |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/app/components/workflow/nodes/question-classifier/components/class-list.tsx b/app/components/workflow/nodes/question-classifier/components/class-list.tsx
index f152917..e23c42b 100644
--- a/app/components/workflow/nodes/question-classifier/components/class-list.tsx
+++ b/app/components/workflow/nodes/question-classifier/components/class-list.tsx
@@ -7,24 +7,21 @@
 import AddButton from '../../_base/components/add-button'
 import Item from './class-item'
 import type { Topic } from '@/app/components/workflow/nodes/question-classifier/types'
-import type { ValueSelector, Var } from '@/app/components/workflow/types'
 
 const i18nPrefix = 'workflow.nodes.questionClassifiers'
 
 type Props = {
-  nodeId: string
+  id: string
   list: Topic[]
   onChange: (list: Topic[]) => void
   readonly?: boolean
-  filterVar: (payload: Var, valueSelector: ValueSelector) => boolean
 }
 
 const ClassList: FC<Props> = ({
-  nodeId,
+  id,
   list,
   onChange,
   readonly,
-  filterVar,
 }) => {
   const { t } = useTranslation()
   const { handleEdgeDeleteByDeleteBranch } = useEdgesInteractions()
@@ -47,13 +44,13 @@
 
   const handleRemoveClass = useCallback((index: number) => {
     return () => {
-      handleEdgeDeleteByDeleteBranch(nodeId, list[index].id)
+      handleEdgeDeleteByDeleteBranch(id, list[index].id)
       const newList = produce(list, (draft) => {
         draft.splice(index, 1)
       })
       onChange(newList)
     }
-  }, [list, onChange, handleEdgeDeleteByDeleteBranch, nodeId])
+  }, [list, onChange, handleEdgeDeleteByDeleteBranch, id])
 
   // Todo Remove; edit topic name
   return (
@@ -62,14 +59,12 @@
         list.map((item, index) => {
           return (
             <Item
-              nodeId={nodeId}
-              key={list[index].id}
+              key={index}
               payload={item}
               onChange={handleClassChange(index)}
               onRemove={handleRemoveClass(index)}
               index={index + 1}
               readonly={readonly}
-              filterVar={filterVar}
             />
           )
         })

--
Gitblit v1.8.0