fix(items-table): use Fragment with key prop to suppress React list key warning
This commit is contained in:
parent
2fcf35235a
commit
bfdf5e73eb
1 changed files with 3 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
"use client";
|
||||
|
||||
import { useState, useMemo } from "react";
|
||||
import { useState, useMemo, Fragment } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import Link from "next/link";
|
||||
import { Search, X, ChevronDown, ChevronRight, MapPin, Tag } from "lucide-react";
|
||||
|
|
@ -189,10 +189,9 @@ export function ItemsTable({
|
|||
const sortedVendors = getSortedVendors(item.vendors);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Fragment key={item.id}>
|
||||
{/* Item row */}
|
||||
<tr
|
||||
key={item.id}
|
||||
className={`cursor-pointer border-b border-neutral-100 transition-colors ${isOpen ? "bg-primary-50" : "hover:bg-neutral-50"}`}
|
||||
onClick={() => toggleRow(item.id)}
|
||||
>
|
||||
|
|
@ -295,7 +294,7 @@ export function ItemsTable({
|
|||
</td>
|
||||
</tr>
|
||||
)}
|
||||
</>
|
||||
</Fragment>
|
||||
);
|
||||
})}
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue