From 0576e7df7e57e6f74b6284ac40a8228733a75f80 Mon Sep 17 00:00:00 2001 From: invalid w Date: Wed, 17 Jan 2024 16:17:04 +0800 Subject: [PATCH] fix(admin-ui->Collections): add key for map fn. resolve #6106 --- .../admin-ui/ui/src/components/molecules/table/index.tsx | 2 +- .../src/components/templates/collections-table/index.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/admin-ui/ui/src/components/molecules/table/index.tsx b/packages/admin-ui/ui/src/components/molecules/table/index.tsx index affcfe3add479..5b926de7cf383 100644 --- a/packages/admin-ui/ui/src/components/molecules/table/index.tsx +++ b/packages/admin-ui/ui/src/components/molecules/table/index.tsx @@ -78,7 +78,7 @@ const Table = React.forwardRef( {filteringOptions ? (
{Array.isArray(filteringOptions) - ? filteringOptions.map((fo) => ) + ? filteringOptions.map((fo, idx) => ) : filteringOptions}
) : ( diff --git a/packages/admin-ui/ui/src/components/templates/collections-table/index.tsx b/packages/admin-ui/ui/src/components/templates/collections-table/index.tsx index 616f591c37cde..592c0d964148d 100644 --- a/packages/admin-ui/ui/src/components/templates/collections-table/index.tsx +++ b/packages/admin-ui/ui/src/components/templates/collections-table/index.tsx @@ -133,10 +133,11 @@ const CollectionsTable: React.FC = () => { {headerGroups?.map((headerGroup) => ( - {headerGroup.headers.map((col) => ( + {headerGroup.headers.map((col, idx) => ( {col.render("Header")} @@ -156,9 +157,9 @@ const CollectionsTable: React.FC = () => { ) : ( - {rows.map((row) => { + {rows.map((row, idx) => { prepareRow(row) - return + return })} )}