Skip to content

Commit

Permalink
Added an option to hide the workbench-view toolbar (#16785)
Browse files Browse the repository at this point in the history
  • Loading branch information
lorem--ipsum authored Jul 23, 2024
1 parent 704962e commit aeb2ee5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web-console/src/views/workbench-view/workbench-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 (
Expand Down

0 comments on commit aeb2ee5

Please sign in to comment.