From 2cbe8091e5949a3f51168ac15fce71deb178851a Mon Sep 17 00:00:00 2001 From: NZ10387 Date: Wed, 17 Apr 2024 00:54:05 +0900 Subject: [PATCH] fix: Do not render ellipses when the number of items is 0 --- core/src/section/Ellipsis.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/section/Ellipsis.tsx b/core/src/section/Ellipsis.tsx index 709bae6e..f400c415 100644 --- a/core/src/section/Ellipsis.tsx +++ b/core/src/section/Ellipsis.tsx @@ -23,7 +23,8 @@ export const EllipsisComp = ({ isExpanded, value, keyName }: E const child = render && typeof render === 'function' && render({ ...reset, 'data-expanded': isExpanded }, { value, keyName }); if (child) return child; - if (!isExpanded) return null; + + if (!isExpanded || (typeof value === 'object' && Object.keys(value).length == 0)) return null; return ; };