primefaces / primereact

The Most Complete React UI Component Library
https://primereact.org
MIT License
6.93k stars 1.05k forks source link

DropdownItem: Error: "key" prop is being spread into JSX #7430

Closed tneeraja95 closed 4 days ago

tneeraja95 commented 4 days ago

Describe the bug

Inside DropdownItem, which is a item in the dropdown list, so key is required prop.

Screenshot 2024-11-18 at 8 01 17 PM

Inside DropdownItem.js, key is in itemProps which should be outside and directly in <li>

Reproducer

https://stackblitz.com/edit/xqgdym?file=src%2FApp.jsx

System Information

react : "18.3.1"
primereact: "10.8.4"

Steps to reproduce the behavior

  1. Open inspect
  2. Click on the dropdown
  3. Can see error in console.

Expected behavior

No error