From 519f73e9b209b94888d57e3573c129fc9e4142d1 Mon Sep 17 00:00:00 2001 From: Victor Zeinstra Date: Mon, 21 Aug 2023 15:35:34 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20bloc=20cc=20non=20trait=C3=A9=20qui=20ne?= =?UTF-8?q?=20s'affiche=20pas=20(#5314)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Victor Zeinstra --- .../Agreement/EnterpriseSearch/ShowAgreements.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/ShowAgreements.tsx b/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/ShowAgreements.tsx index 47ee8fe4e1..5654735129 100644 --- a/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/ShowAgreements.tsx +++ b/packages/code-du-travail-frontend/src/outils/common/Agreement/EnterpriseSearch/ShowAgreements.tsx @@ -42,7 +42,7 @@ const ShowAgreements = ({ key={agreement.id} type="radio" name={AGREEMENT_ID_NAME} - value={`${agreement.id}`} + value={agreement.id} validate={required} > {(props) => ( @@ -61,11 +61,11 @@ const ShowAgreements = ({ })} {(values) => { - const agreement = enterprise?.conventions?.find( - (agreement) => agreement.id === values + const agreementChanged = enterprise?.conventions?.find( + (agreement) => agreement.id.toString() === values.toString() ); - setAgreement(agreement); - onChange(enterprise, agreement ?? null); + setAgreement(agreementChanged); + onChange(enterprise, agreementChanged ?? null); }}