fix(dropdown): spread key warning (#1377)

This commit is contained in:
Junior Garcia 2023-08-12 11:33:13 -03:00 committed by GitHub
parent e9c08abd55
commit fd4e01dcfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -0,0 +1,5 @@
---
"@nextui-org/dropdown": patch
---
fix #1376 Dropdown item spread key warning

View File

@ -49,7 +49,6 @@ const DropdownSection = forwardRef<"li", DropdownSectionProps>(
as,
variant,
color,
key: keyProp,
disableAnimation,
onAction,
closeOnSelect,
@ -80,7 +79,6 @@ const DropdownSection = forwardRef<"li", DropdownSectionProps>(
return (
<Component
key={keyProp || item.key}
data-slot="base"
{...mergeProps(itemProps, otherProps)}
className={slots.base({class: baseStyles})}

View File

@ -37,7 +37,6 @@ export function useDropdownItem<T extends object>(originalProps: UseDropdownItem
item,
state,
shortcut,
key: keyProp,
description,
startContent,
endContent,
@ -122,7 +121,6 @@ export function useDropdownItem<T extends object>(originalProps: UseDropdownItem
}
const getItemProps: PropGetter = (props = {}) => ({
key: keyProp || key,
ref: domRef,
...mergeProps(
itemProps,