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

show only skeleton when loading
This commit is contained in:
Ayush Agrawal
2023-10-06 14:36:05 +05:30
committed by GitHub
parent 53021dc64f
commit 7574ad82fe

View File

@ -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 && (