From dc0ab88fb9c62740244cb29b88f6c2e8f8a47155 Mon Sep 17 00:00:00 2001 From: kent Date: Thu, 15 Jan 2026 16:30:12 +0900 Subject: [PATCH] =?UTF-8?q?fix(WEB):=20=EA=B2=AC=EC=A0=81=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=20=EC=A0=9C=ED=92=88=20=EC=84=A0=ED=83=9D=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20React=20key=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 제품 목록에서 null/undefined item_code 필터링 - 중복 item_code 제거 로직 추가 - key prop에 index 조합으로 고유성 보장 --- src/components/quotes/QuoteRegistration.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/components/quotes/QuoteRegistration.tsx b/src/components/quotes/QuoteRegistration.tsx index 01695336..1f45e119 100644 --- a/src/components/quotes/QuoteRegistration.tsx +++ b/src/components/quotes/QuoteRegistration.tsx @@ -813,11 +813,16 @@ export function QuoteRegistration({ - {getFilteredProducts(formData.items[activeItemIndex].productCategory).map((product) => ( - - {product.item_name} ({product.item_code}) - - ))} + {getFilteredProducts(formData.items[activeItemIndex].productCategory) + .filter((product) => product.item_code) // null/undefined 제외 + .filter((product, index, self) => + index === self.findIndex(p => p.item_code === product.item_code) + ) + .map((product, index) => ( + + {product.item_name} ({product.item_code}) + + ))}