From 88eb2ad8b621cc31612b14cc6d7e979e663f7b8b Mon Sep 17 00:00:00 2001 From: "Jingwei.Zhang" Date: Mon, 10 Oct 2022 14:20:37 +0800 Subject: [PATCH] feat: update the generic idNameColumn 1. only show the first 8 character of the id 2. support id copy 3. bold the name to make it stand out 4. the idNameColumn can be used in the action codes Change-Id: I5b0cdb0b1d76b795ae5dc83ebb3f6e8d3f4c3eec --- src/utils/table.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/table.jsx b/src/utils/table.jsx index 84369d2c..55d84e23 100644 --- a/src/utils/table.jsx +++ b/src/utils/table.jsx @@ -275,10 +275,12 @@ export const idNameColumn = { title: t('ID/Name'), dataIndex: 'name', render: (value, record) => { + const idRender = getIdRender(record.id, true, false); + const nameRender = getNameRenderWithStyle(value); return ( <> -
{record.id}
-
{value}
+
{idRender}
+ {nameRender} ); },