瀏覽代碼

添加相应 点击行

visuddhinanda 2 年之前
父節點
當前提交
49c7d6b6f1
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      dashboard/src/components/tag/TagList.tsx

+ 10 - 0
dashboard/src/components/tag/TagList.tsx

@@ -163,6 +163,16 @@ const TagsList = ({ studioName, readonly = false, onSelect }: IWidget) => {
           },
         },
       }}
+      onItem={(record: ITagData, index: number) => {
+        return {
+          onClick: (event) => {
+            // 点击行
+            if (typeof onSelect !== "undefined") {
+              onSelect(record);
+            }
+          },
+        };
+      }}
     />
   );
 };