fix(sqllab): Skip AceEditor in inactive tabs (#30171)

This commit is contained in:
JUST.in DO IT
2024-09-06 09:58:59 -07:00
committed by GitHub
parent 6294e339e2
commit 4d1db9e32c
2 changed files with 23 additions and 9 deletions

View File

@@ -880,15 +880,17 @@ const SqlEditor: FC<Props> = ({
startQuery={startQuery}
/>
)}
<AceEditorWrapper
autocomplete={autocompleteEnabled}
onBlur={onSqlChanged}
onChange={onSqlChanged}
queryEditorId={queryEditor.id}
onCursorPositionChange={handleCursorPositionChange}
height={`${aceEditorHeight}px`}
hotkeys={hotkeys}
/>
{isActive && (
<AceEditorWrapper
autocomplete={autocompleteEnabled}
onBlur={onSqlChanged}
onChange={onSqlChanged}
queryEditorId={queryEditor.id}
onCursorPositionChange={handleCursorPositionChange}
height={`${aceEditorHeight}px`}
hotkeys={hotkeys}
/>
)}
{renderEditorBottomBar(showEmptyState)}
</div>
<SouthPane