Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB-1134] fix: module link mutation issue (#4413)

rahulramesha692f570258d0
diff --git a/web/components/modules/sidebar.tsx b/web/components/modules/sidebar.tsx
index 2e98a38c2f..d2c847eccd 100644
--- a/web/components/modules/sidebar.tsx
+++ b/web/components/modules/sidebar.tsx
@@ -644,7 +644,8 @@ export const ModuleDetailsSidebar: React.FC<Props> = observer((props) => {
</div>
<div className="flex w-full flex-col items-center justify-start gap-2 border-t border-custom-border-200 px-1.5 py-5">
- <Disclosure>
+ {/* Accessing link outside the disclosure as mobx is not considering the children inside Disclosure as part of the component hence not observing their state change*/}
+ <Disclosure defaultOpen={!!moduleDetails?.link_module?.length}>
{({ open }) => (
<div className={`relative flex h-full w-full flex-col ${open ? "" : "flex-row"}`}>
<Disclosure.Button className="flex w-full items-center justify-between gap-2 p-1.5">