Fix: Wrong assignee on loading team member picker (#1894)

show only skeleton when loading
This commit is contained in:
Ayush Agrawal
2023-10-06 11:06:05 +02:00
committed by GitHub
parent 53021dc64f
commit 7574ad82fe
@@ -104,7 +104,15 @@ export const SingleEntitySelectBase = <
return (
<>
<StyledDropdownMenuItemsContainer ref={containerRef} hasMaxHeight>
{isAllEntitySelectShown && selectAllLabel && onAllEntitySelected && (
{loading ? (
<DropdownMenuSkeletonItem />
) : entitiesInDropdown.length === 0 && !isAllEntitySelectShown ? (
<MenuItem text="No result" />
) : (
<>
{isAllEntitySelectShown &&
selectAllLabel &&
onAllEntitySelected && (
<MenuItemSelect
onClick={() => onAllEntitySelected()}
LeftIcon={SelectAllIcon}
@@ -122,12 +130,7 @@ export const SingleEntitySelectBase = <
selected={!selectedEntity}
/>
)}
{loading ? (
<DropdownMenuSkeletonItem />
) : entitiesInDropdown.length === 0 && !isAllEntitySelectShown ? (
<MenuItem text="No result" />
) : (
entitiesInDropdown?.map((entity) => (
{entitiesInDropdown?.map((entity) => (
<MenuItemSelectAvatar
key={entity.id}
testId="menu-item"
@@ -145,7 +148,8 @@ export const SingleEntitySelectBase = <
/>
}
/>
))
))}
</>
)}
</StyledDropdownMenuItemsContainer>
{showCreateButton && (