[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

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') {