Skip to content

Commit

Permalink
get autocomplete words only needed
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpark committed Apr 12, 2023
1 parent 0d2737e commit eab204a
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,14 @@ const AceEditorWrapper = ({
'validationResult',
'schema',
]);
const { data: schemaOptions } = useSchemas({ dbId: queryEditor.dbId });
const { data: schemaOptions } = useSchemas({
...(autocomplete && { dbId: queryEditor.dbId }),
});
const { data: tableData } = useTables({
dbId: queryEditor.dbId,
schema: queryEditor.schema,
...(autocomplete && {
dbId: queryEditor.dbId,
schema: queryEditor.schema,
}),
});

const currentSql = queryEditor.sql ?? '';
Expand Down

0 comments on commit eab204a

Please sign in to comment.