Add key prop to Dropdown items: ensure unique identification for each item in the Dropdown component to prevent rendering issues and improve performance.

This commit is contained in:
Norbert Maciaszek 2025-08-11 23:57:17 +02:00
parent e189770473
commit 403f394924
1 changed files with 1 additions and 0 deletions

View File

@ -27,6 +27,7 @@ export const Dropdown: FC<Props> = ({ items, defaultValue, callback }) => {
<div className="absolute left-0 z-20 w-48 py-2 mt-2 origin-top-right bg-white rounded-md shadow-xl dark:bg-gray-800 opacity-0">
{items.map((item) => (
<p
key={item.value}
onClick={() => {
setValue(item.value);
}}