mirror of
https://github.com/apache/superset.git
synced 2026-07-11 17:25:31 +00:00
fix(sqllab): inactive leftbar selector on empty state (#38833)
This commit is contained in:
@@ -47,6 +47,7 @@ import { newQueryTabName } from '../utils/newQueryTabName';
|
||||
import getInitialState from '../reducers/getInitialState';
|
||||
import { rehydratePersistedState } from '../utils/reduxStateToLocalStorageHelper';
|
||||
import { PREVIEW_QUERY_LIMIT } from '../constants';
|
||||
import { EMPTY_STATE_QE_ID } from '../hooks/useQueryEditor';
|
||||
|
||||
// Type definitions for SqlLab actions
|
||||
export interface Query {
|
||||
@@ -754,7 +755,7 @@ export function addNewQueryEditor(): SqlLabThunkAction<SqlLabAction> {
|
||||
const defaultDbId = common.conf.SQLLAB_DEFAULT_DBID as number | undefined;
|
||||
const activeQueryEditor = queryEditors.find(
|
||||
(qe: QueryEditor) => qe.id === tabHistory[tabHistory.length - 1],
|
||||
);
|
||||
) ?? { id: EMPTY_STATE_QE_ID };
|
||||
const dbIds = Object.values(databases).map(
|
||||
(database: { id: number }) => database.id,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user