Skip to content

Commit abb0863

Browse files
authored
Fix: Dropdowmitem: Passing key directly without using spread (#7431)
1 parent 4e5cc1c commit abb0863

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

components/lib/dropdown/DropdownItem.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export const DropdownItem = React.memo((props) => {
3333
{
3434
id: `dropdownItem_${index}`,
3535
role: 'option',
36-
key: props.label,
3736
className: classNames(option.className, cx('item', { selected, disabled, label, index, focusedOptionIndex, highlightOnSelect })),
3837
style: props.style,
3938
tabIndex: 0,
@@ -80,7 +79,7 @@ export const DropdownItem = React.memo((props) => {
8079
};
8180

8281
return (
83-
<li {...itemProps}>
82+
<li key={props.label} {...itemProps}>
8483
{checkmark && iconRenderer()}
8584
<span {...itemGroupLabelProps}>{content}</span>
8685
<Ripple />

0 commit comments

Comments
 (0)