From dc18bc40b07147f833d84644945ccd79c91b3d6b Mon Sep 17 00:00:00 2001 From: Moussa Bistami <42296438+Mbistami@users.noreply.github.com> Date: Sat, 29 Jul 2023 20:19:15 +0100 Subject: [PATCH] Remove empty values from relation picker (#986) fix: empty name values in SingleEntitySelectBase --- .../ui/relation-picker/components/SingleEntitySelectBase.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/front/src/modules/ui/relation-picker/components/SingleEntitySelectBase.tsx b/front/src/modules/ui/relation-picker/components/SingleEntitySelectBase.tsx index 2f11e073fb..9557290c92 100644 --- a/front/src/modules/ui/relation-picker/components/SingleEntitySelectBase.tsx +++ b/front/src/modules/ui/relation-picker/components/SingleEntitySelectBase.tsx @@ -68,6 +68,10 @@ export function SingleEntitySelectBase< [onCancel], ); + entitiesInDropdown = entitiesInDropdown.filter((entity) => + isNonEmptyString(entity.name.trim()), + ); + return ( {entities.loading ? (