From a59a0ceaa671564705935b5c6a3dca054cfad6c5 Mon Sep 17 00:00:00 2001 From: dahoud Date: Thu, 2 Oct 2025 00:22:57 +0000 Subject: [PATCH] fix: Fix TypeScript error in Dropdown optionLabel --- app/(main)/admin/attributions/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/(main)/admin/attributions/page.tsx b/app/(main)/admin/attributions/page.tsx index 378768f..8b19420 100644 --- a/app/(main)/admin/attributions/page.tsx +++ b/app/(main)/admin/attributions/page.tsx @@ -339,7 +339,7 @@ const AttributionsPage = () => { value={selectedGestionnairePrincipal} options={gestionnaires} onChange={(e) => setSelectedGestionnairePrincipal(e.value)} - optionLabel={(option) => `${option.prenom} ${option.nom}`} + optionLabel="nom"`n itemTemplate={(option) => option ? `${option.prenom} ${option.nom}` : ''} placeholder="Sélectionnez un gestionnaire principal" showClear className="w-full" @@ -358,7 +358,7 @@ const AttributionsPage = () => { value={selectedGestionnairesSecondaires} options={gestionnaires.filter(g => g.id !== selectedGestionnairePrincipal?.id)} onChange={(e) => setSelectedGestionnairesSecondaires(e.value)} - optionLabel={(option) => `${option.prenom} ${option.nom}`} + optionLabel="nom"`n itemTemplate={(option) => option ? `${option.prenom} ${option.nom}` : ''} placeholder="Sélectionnez des gestionnaires secondaires" className="w-full" maxSelectedLabels={3}