Skip to content

Commit 8700575

Browse files
committed
fix
1 parent 420b9e7 commit 8700575

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Collapse.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ const Collapse = React.forwardRef<HTMLDivElement, CollapseProps>((props, ref) =>
134134
...restProps
135135
} = item;
136136

137-
const key = rawKey || String(index);
137+
// You may be puzzled why you want to convert them all into strings, me too.
138+
// Maybe: https://github.com/react-component/collapse/blob/aac303a8b6ff30e35060b4f8fecde6f4556fcbe2/src/Collapse.tsx#L15
139+
const key = String(rawKey ?? index);
138140
const mergeCollapsible = rawCollapsible ?? collapsible;
139141
const mergeDestroyInactivePanel = rawDestroyInactivePanel ?? destroyInactivePanel;
140142

0 commit comments

Comments
 (0)