Skip to content

Commit

Permalink
Fix: Dropdowmitem: Passing key directly without using spread (#7431)
Browse files Browse the repository at this point in the history
  • Loading branch information
tneeraja95 authored Nov 18, 2024
1 parent 4e5cc1c commit abb0863
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/lib/dropdown/DropdownItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export const DropdownItem = React.memo((props) => {
{
id: `dropdownItem_${index}`,
role: 'option',
key: props.label,
className: classNames(option.className, cx('item', { selected, disabled, label, index, focusedOptionIndex, highlightOnSelect })),
style: props.style,
tabIndex: 0,
Expand Down Expand Up @@ -80,7 +79,7 @@ export const DropdownItem = React.memo((props) => {
};

return (
<li {...itemProps}>
<li key={props.label} {...itemProps}>
{checkmark && iconRenderer()}
<span {...itemGroupLabelProps}>{content}</span>
<Ripple />
Expand Down

0 comments on commit abb0863

Please sign in to comment.