From 2835a1aa9823c2619c863c3dab0bc7c5d7971a5a Mon Sep 17 00:00:00 2001
From: Vijay Prasanna <vijayprasanna2896@gmail.com>
Date: Mon, 10 Oct 2022 18:15:41 +0530
Subject: [PATCH] fix (console): tree nav auto-select when table/database is
 present in the route

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6205
GitOrigin-RevId: 61d89f4dbd2fac0fca58c0c7eefe735856637a42
---
 console/src/components/Services/Data/GDCTree/GDCTree.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/console/src/components/Services/Data/GDCTree/GDCTree.tsx b/console/src/components/Services/Data/GDCTree/GDCTree.tsx
index e3aa69ffcbe..8a3e0c93174 100644
--- a/console/src/components/Services/Data/GDCTree/GDCTree.tsx
+++ b/console/src/components/Services/Data/GDCTree/GDCTree.tsx
@@ -16,7 +16,7 @@ const getCurrentActiveKeys = () => {
   const table = params.get('table');
 
   if (table) {
-    activeKey.push(JSON.stringify({ database, ...JSON.parse(table) }));
+    activeKey.push(JSON.stringify({ database, table: JSON.parse(table) }));
   } else {
     activeKey.push(JSON.stringify({ database }));
   }