diff --git a/front/src/modules/ui/input/relation-picker/components/SingleEntitySelectBase.tsx b/front/src/modules/ui/input/relation-picker/components/SingleEntitySelectBase.tsx index 48f2783d3..fc659d972 100644 --- a/front/src/modules/ui/input/relation-picker/components/SingleEntitySelectBase.tsx +++ b/front/src/modules/ui/input/relation-picker/components/SingleEntitySelectBase.tsx @@ -104,48 +104,52 @@ export const SingleEntitySelectBase = < return ( <> - {isAllEntitySelectShown && selectAllLabel && onAllEntitySelected && ( - onAllEntitySelected()} - LeftIcon={SelectAllIcon} - text={selectAllLabel} - hovered={preselectedOptionId === EmptyButtonId} - selected={!!isAllEntitySelected} - /> - )} - {emptyLabel && ( - onEntitySelected()} - LeftIcon={EmptyIcon} - text={emptyLabel} - hovered={preselectedOptionId === EmptyButtonId} - selected={!selectedEntity} - /> - )} {loading ? ( ) : entitiesInDropdown.length === 0 && !isAllEntitySelectShown ? ( ) : ( - entitiesInDropdown?.map((entity) => ( - onEntitySelected(entity)} - text={entity.name} - hovered={preselectedOptionId === entity.id} - avatar={ - + {isAllEntitySelectShown && + selectAllLabel && + onAllEntitySelected && ( + onAllEntitySelected()} + LeftIcon={SelectAllIcon} + text={selectAllLabel} + hovered={preselectedOptionId === EmptyButtonId} + selected={!!isAllEntitySelected} /> - } - /> - )) + )} + {emptyLabel && ( + onEntitySelected()} + LeftIcon={EmptyIcon} + text={emptyLabel} + hovered={preselectedOptionId === EmptyButtonId} + selected={!selectedEntity} + /> + )} + {entitiesInDropdown?.map((entity) => ( + onEntitySelected(entity)} + text={entity.name} + hovered={preselectedOptionId === entity.id} + avatar={ + + } + /> + ))} + )} {showCreateButton && (