From 7574ad82fe37fe65a5c4bb9fc629ef85ea35f8ab Mon Sep 17 00:00:00 2001 From: Ayush Agrawal <54364088+AyushAgrawal-A2@users.noreply.github.com> Date: Fri, 6 Oct 2023 14:36:05 +0530 Subject: [PATCH] Fix: Wrong assignee on loading team member picker (#1894) show only skeleton when loading --- .../components/SingleEntitySelectBase.tsx | 76 ++++++++++--------- 1 file changed, 40 insertions(+), 36 deletions(-) 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 && (