diff --git a/superset-frontend/src/SqlLab/components/TabbedSqlEditors.jsx b/superset-frontend/src/SqlLab/components/TabbedSqlEditors.jsx index f0f6d4859f..fe8b5d0d75 100644 --- a/superset-frontend/src/SqlLab/components/TabbedSqlEditors.jsx +++ b/superset-frontend/src/SqlLab/components/TabbedSqlEditors.jsx @@ -116,8 +116,15 @@ class TabbedSqlEditors extends React.PureComponent { } // merge post form data with GET search params + // Hack: this data should be comming from getInitialState + // but for some reason this data isn't being passed properly through + // the reducer. + const appContainer = document.getElementById('app'); + const bootstrapData = JSON.parse( + appContainer?.getAttribute('data-bootstrap') || '{}', + ); const query = { - ...this.props.requestedQuery, + ...bootstrapData.requested_query, ...URI(window.location).search(true), };