console: set browse as default tab when switching tables

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8501
GitOrigin-RevId: 7d639822996f762efcbe94cc3512d3197eda8b22
This commit is contained in:
Julian@Hasura 2023-03-27 16:32:05 -03:00 committed by hasura-bot
parent d85de6bb6a
commit 58d9e8cbea

View File

@ -30,7 +30,7 @@ export const useGDCTreeItemClick = (dispatch: Dispatch) => {
*/
const isTableClicked = Object.keys(rest?.table || {}).length !== 0;
if (isTableClicked) {
dispatch(_push(getRoute().table(database, rest.table)));
dispatch(_push(getRoute().table(database, rest.table, 'browse')));
} else {
dispatch(_push(getRoute().database(database)));
}