From fb3078f740414ab5bfaa1e266194c432483d5c23 Mon Sep 17 00:00:00 2001 From: "Jingwei.Zhang" Date: Wed, 12 Oct 2022 10:02:19 +0800 Subject: [PATCH] feat: update id render to support number format Update the getIdRender func to support resource id of numeric type Change-Id: I0bec014d1b8e1726ae6092f8d2dd0710151283fb --- src/utils/table.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/table.jsx b/src/utils/table.jsx index f1122eff..9aa7a98e 100644 --- a/src/utils/table.jsx +++ b/src/utils/table.jsx @@ -160,7 +160,7 @@ const getLinkUrl = (prefix, id) => { }; export const getIdRender = (value, copyable = true, isLink = true) => { - const short = (value || '').substring(0, 8); + const short = `${value || ''}`.substring(0, 8); const shortRender = isLink ? ( {short} ) : (