mirror of
https://github.com/apache/superset.git
synced 2026-05-31 13:19:23 +00:00
fix: navigate to SQL Lab due to router api updates (#34569)
This commit is contained in:
@@ -125,11 +125,11 @@ const ViewQuery: FC<ViewQueryProps> = props => {
|
||||
if (domEvent.metaKey || domEvent.ctrlKey) {
|
||||
domEvent.preventDefault();
|
||||
window.open(
|
||||
`/sqllab?datasourceKey=${datasource}&sql=${currentSQL}`,
|
||||
`/sqllab?datasourceKey=${datasource}&sql=${encodeURIComponent(currentSQL)}`,
|
||||
'_blank',
|
||||
);
|
||||
} else {
|
||||
history.push('/sqllab', { state: { requestedQuery } });
|
||||
history.push({ pathname: '/sqllab', state: { requestedQuery } });
|
||||
}
|
||||
},
|
||||
[history, datasource, currentSQL],
|
||||
|
||||
Reference in New Issue
Block a user