From aa3c3c5aaa0d9fa1769ca310c9e944e86695d7db Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" <70410625+michael-s-molina@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:48:07 -0300 Subject: [PATCH] fix: Cannot expand initially hidden SQL Lab tab (#26279) --- superset-frontend/src/SqlLab/components/SqlEditor/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx b/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx index 73941fbc7..088143448 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx @@ -93,7 +93,7 @@ import { } from 'src/utils/localStorageHelpers'; import { EmptyStateBig } from 'src/components/EmptyState'; import getBootstrapData from 'src/utils/getBootstrapData'; -import { isEmpty } from 'lodash'; +import { isBoolean, isEmpty } from 'lodash'; import TemplateParamsEditor from '../TemplateParamsEditor'; import SouthPane from '../SouthPane'; import SaveQuery, { QueryPayload } from '../SaveQuery'; @@ -255,7 +255,9 @@ const SqlEditor: React.FC = ({ if (unsavedQueryEditor?.id === queryEditor.id) { dbId = unsavedQueryEditor.dbId || dbId; latestQueryId = unsavedQueryEditor.latestQueryId || latestQueryId; - hideLeftBar = unsavedQueryEditor.hideLeftBar || hideLeftBar; + hideLeftBar = isBoolean(unsavedQueryEditor.hideLeftBar) + ? unsavedQueryEditor.hideLeftBar + : hideLeftBar; } return { database: databases[dbId || ''],