From ed1ffb692f270cc4705e7c61c1b4f053de7629c2 Mon Sep 17 00:00:00 2001
From: vaidankarswapnil <81285216+vaidankarswapnil@users.noreply.github.com>
Date: Wed, 6 Oct 2021 20:23:46 +0530
Subject: [PATCH] Fix ally database panel open issue (#1120)
---
.../CommandBar/CommandBarComponentButtonFactory.tsx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx
index e56341d80..a1d19e257 100644
--- a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx
+++ b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx
@@ -307,11 +307,18 @@ function createOpenSynapseLinkDialogButton(container: Explorer): CommandButtonCo
function createNewDatabase(container: Explorer): CommandButtonComponentProps {
const label = "New " + getDatabaseName();
+ const newDatabaseButton = document.activeElement as HTMLElement;
+
return {
iconSrc: AddDatabaseIcon,
iconAlt: label,
onCommandClick: () =>
- useSidePanel.getState().openSidePanel("New " + getDatabaseName(), ),
+ useSidePanel
+ .getState()
+ .openSidePanel(
+ "New " + getDatabaseName(),
+
+ ),
commandButtonLabel: label,
ariaLabel: label,
hasPopup: true,