Skip to content

Commit 6902b8f

Browse files
korkt-kimNZ10387
and
NZ10387
authored
fix: Do not render ellipses when the number of items is 0 (#48)
Co-authored-by: NZ10387 <nz10387@naverz-corp.com>
1 parent 5c2fbf2 commit 6902b8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/section/Ellipsis.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export const EllipsisComp = <T extends object>({ isExpanded, value, keyName }: E
2323
const child =
2424
render && typeof render === 'function' && render({ ...reset, 'data-expanded': isExpanded }, { value, keyName });
2525
if (child) return child;
26-
if (!isExpanded) return null;
26+
27+
if (!isExpanded || (typeof value === 'object' && Object.keys(value).length == 0)) return null;
2728
return <Elm {...reset} />;
2829
};
2930

0 commit comments

Comments
 (0)