[SQL Lab] Disable autocomplete when typing numbers (#9008)

This commit is contained in:
Erik Ritter 2020-01-23 16:07:36 -08:00 committed by GitHub
parent 4b5d141f20
commit d3d8603620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -131,6 +131,11 @@ class AceEditorWrapper extends React.PureComponent {
this.props.onChange(text);
}
getCompletions(aceEditor, session, pos, prefix, callback) {
// If the prefix starts with a number, don't try to autocomplete with a
// table name or schema or anything else
if (!isNaN(parseInt(prefix, 10))) {
return;
}
const completer = {
insertMatch: (editor, data) => {
if (data.meta === 'table') {