feat(sqllab): Add a configuration option to disable data preview (#19104)

This commit is contained in:
cccs-Dustin
2022-03-17 09:22:57 -04:00
committed by GitHub
parent cfb967f430
commit 02ef9ca4cd
18 changed files with 175 additions and 42 deletions

View File

@@ -43,11 +43,17 @@ interface Props {
actions: {
queryEditorSetSelectedText: (edit: any, text: null | string) => void;
queryEditorSetFunctionNames: (queryEditor: object, dbId: number) => void;
addTable: (queryEditor: any, value: any, schema: any) => void;
addTable: (
queryEditor: any,
database: any,
value: any,
schema: any,
) => void;
};
autocomplete: boolean;
onBlur: (sql: string) => void;
sql: string;
database: any;
schemas: any[];
tables: any[];
functionNames: string[];
@@ -210,6 +216,7 @@ class AceEditorWrapper extends React.PureComponent<Props, State> {
if (data.meta === 'table') {
this.props.actions.addTable(
this.props.queryEditor,
this.props.database,
data.value,
this.props.queryEditor.schema,
);