mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix(Sqllab): Autocomplete got stuck in UI when open it too fast (#33522)
This commit is contained in:
@@ -325,6 +325,8 @@ const SqlEditor: FC<Props> = ({
|
||||
|
||||
const SqlFormExtension = extensionsRegistry.get('sqleditor.extension.form');
|
||||
|
||||
const isTempId = (value: unknown): boolean => Number.isNaN(Number(value));
|
||||
|
||||
const startQuery = useCallback(
|
||||
(ctasArg = false, ctas_method = CtasEnum.Table) => {
|
||||
if (!database) {
|
||||
@@ -915,7 +917,7 @@ const SqlEditor: FC<Props> = ({
|
||||
)}
|
||||
{isActive && (
|
||||
<AceEditorWrapper
|
||||
autocomplete={autocompleteEnabled}
|
||||
autocomplete={autocompleteEnabled && !isTempId(queryEditor.id)}
|
||||
onBlur={onSqlChanged}
|
||||
onChange={onSqlChanged}
|
||||
queryEditorId={queryEditor.id}
|
||||
|
||||
Reference in New Issue
Block a user