Fix: Wrong assignee on loading team member picker (#1894)
show only skeleton when loading
This commit is contained in:
@ -104,7 +104,15 @@ export const SingleEntitySelectBase = <
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<StyledDropdownMenuItemsContainer ref={containerRef} hasMaxHeight>
|
<StyledDropdownMenuItemsContainer ref={containerRef} hasMaxHeight>
|
||||||
{isAllEntitySelectShown && selectAllLabel && onAllEntitySelected && (
|
{loading ? (
|
||||||
|
<DropdownMenuSkeletonItem />
|
||||||
|
) : entitiesInDropdown.length === 0 && !isAllEntitySelectShown ? (
|
||||||
|
<MenuItem text="No result" />
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
{isAllEntitySelectShown &&
|
||||||
|
selectAllLabel &&
|
||||||
|
onAllEntitySelected && (
|
||||||
<MenuItemSelect
|
<MenuItemSelect
|
||||||
onClick={() => onAllEntitySelected()}
|
onClick={() => onAllEntitySelected()}
|
||||||
LeftIcon={SelectAllIcon}
|
LeftIcon={SelectAllIcon}
|
||||||
@ -122,12 +130,7 @@ export const SingleEntitySelectBase = <
|
|||||||
selected={!selectedEntity}
|
selected={!selectedEntity}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{loading ? (
|
{entitiesInDropdown?.map((entity) => (
|
||||||
<DropdownMenuSkeletonItem />
|
|
||||||
) : entitiesInDropdown.length === 0 && !isAllEntitySelectShown ? (
|
|
||||||
<MenuItem text="No result" />
|
|
||||||
) : (
|
|
||||||
entitiesInDropdown?.map((entity) => (
|
|
||||||
<MenuItemSelectAvatar
|
<MenuItemSelectAvatar
|
||||||
key={entity.id}
|
key={entity.id}
|
||||||
testId="menu-item"
|
testId="menu-item"
|
||||||
@ -145,7 +148,8 @@ export const SingleEntitySelectBase = <
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
))
|
))}
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
</StyledDropdownMenuItemsContainer>
|
</StyledDropdownMenuItemsContainer>
|
||||||
{showCreateButton && (
|
{showCreateButton && (
|
||||||
|
|||||||
Reference in New Issue
Block a user