From 7361f3866530090cbd2b47b964c38ded5dcd8063 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Tue, 29 Mar 2022 12:30:23 +0300 Subject: [PATCH] Make SidebarCluser observable Signed-off-by: Alex Andreev --- src/renderer/components/layout/sidebar-cluster.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/layout/sidebar-cluster.tsx b/src/renderer/components/layout/sidebar-cluster.tsx index 58cae55c99..34d9b733fc 100644 --- a/src/renderer/components/layout/sidebar-cluster.tsx +++ b/src/renderer/components/layout/sidebar-cluster.tsx @@ -16,6 +16,7 @@ import { navigate } from "../../navigation"; import { Menu, MenuItem } from "../menu"; import { ConfirmDialog } from "../confirm-dialog"; import { Tooltip } from "../tooltip"; +import { observer } from "mobx-react"; const contextMenu: CatalogEntityContextMenuContext = observable({ menuItems: [], @@ -59,7 +60,7 @@ function renderLoadingSidebarCluster() { ); } -export function SidebarCluster({ clusterEntity }: { clusterEntity: CatalogEntity }) { +export const SidebarCluster = observer(({ clusterEntity }: { clusterEntity: CatalogEntity }) => { const [opened, setOpened] = useState(false); if (!clusterEntity) { @@ -138,4 +139,4 @@ export function SidebarCluster({ clusterEntity }: { clusterEntity: CatalogEntity ); -} +});