Remove empty values from relation picker (#986)

fix: empty name values in SingleEntitySelectBase
This commit is contained in:
Moussa Bistami 2023-07-29 20:19:15 +01:00 committed by GitHub
parent 5c376cbabb
commit dc18bc40b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,6 +68,10 @@ export function SingleEntitySelectBase<
[onCancel], [onCancel],
); );
entitiesInDropdown = entitiesInDropdown.filter((entity) =>
isNonEmptyString(entity.name.trim()),
);
return ( return (
<DropdownMenuItemsContainer ref={containerRef} hasMaxHeight> <DropdownMenuItemsContainer ref={containerRef} hasMaxHeight>
{entities.loading ? ( {entities.loading ? (