From b03f6a81e20810f9f658f0052f38fd394510a9e0 Mon Sep 17 00:00:00 2001 From: Lakhan Baheti <94619783+1akhanBaheti@users.noreply.github.com> Date: Thu, 7 Mar 2024 13:26:58 +0530 Subject: [PATCH] fix: project members settings flickering (#3894) --- web/components/project/member-select.tsx | 4 ++-- .../project/project-settings-member-defaults.tsx | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/web/components/project/member-select.tsx b/web/components/project/member-select.tsx index 2aa83cd06..e6e0335e6 100644 --- a/web/components/project/member-select.tsx +++ b/web/components/project/member-select.tsx @@ -49,14 +49,14 @@ export const MemberSelect: React.FC = observer((props) => { +
{selectedOption && } {selectedOption ? ( selectedOption.member?.display_name ) : (
- None + None
)}
diff --git a/web/components/project/project-settings-member-defaults.tsx b/web/components/project/project-settings-member-defaults.tsx index d6cffa7a4..89695e891 100644 --- a/web/components/project/project-settings-member-defaults.tsx +++ b/web/components/project/project-settings-member-defaults.tsx @@ -63,11 +63,14 @@ export const ProjectSettingsMemberDefaults: React.FC = observer(() => { }); await updateProject(workspaceSlug.toString(), projectId.toString(), { - default_assignee: formData.default_assignee === "none" ? null : formData.default_assignee, - project_lead: formData.project_lead === "none" ? null : formData.project_lead, + default_assignee: + formData.default_assignee === "none" + ? null + : formData.default_assignee ?? currentProjectDetails?.default_assignee, + project_lead: + formData.project_lead === "none" ? null : formData.project_lead ?? currentProjectDetails?.project_lead, }) .then(() => { - fetchProjectDetails(workspaceSlug.toString(), projectId.toString()); setToast({ title: "Success", type: TOAST_TYPE.SUCCESS,