Added an option to hide the workbench-view toolbar (#16785)

This commit is contained in:
Sébastien 2024-07-24 00:36:54 +02:00 committed by GitHub
parent 704962ec8e
commit aeb2ee59a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -104,6 +104,7 @@ export interface WorkbenchViewProps {
maxTaskMenuHeader?: JSX.Element;
enginesLabelFn?: ComponentProps<typeof QueryTab>['enginesLabelFn'];
maxTaskLabelFn?: ComponentProps<typeof QueryTab>['maxTaskLabelFn'];
hideToolbar?: boolean;
}
export interface WorkbenchViewState {
@ -613,8 +614,9 @@ export class WorkbenchView extends React.PureComponent<WorkbenchViewProps, Workb
}
private renderToolbar() {
const { queryEngines } = this.props;
const { queryEngines, hideToolbar } = this.props;
if (!queryEngines.includes('sql-msq-task')) return;
if (hideToolbar) return;
const { showRecentQueryTaskPanel } = this.state;
return (