modified: frontend/src/components/SqlEditor.tsx
This commit is contained in:
@@ -50,7 +50,7 @@ const getCachedTables = async (databaseId: string): Promise<string[]> => {
|
|||||||
let completionProviderRegistered = false;
|
let completionProviderRegistered = false;
|
||||||
let currentDatabaseId: string | undefined;
|
let currentDatabaseId: string | undefined;
|
||||||
|
|
||||||
export default function SqlEditor({ value, onChange, databaseId, height = '400px' }: SqlEditorProps) {
|
export default function SqlEditor({ value, onChange, databaseId, height }: SqlEditorProps) {
|
||||||
const editorRef = useRef<any>(null);
|
const editorRef = useRef<any>(null);
|
||||||
const monacoRef = useRef<Monaco | null>(null);
|
const monacoRef = useRef<Monaco | null>(null);
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ export default function SqlEditor({ value, onChange, databaseId, height = '400px
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="border border-gray-300 rounded-lg overflow-hidden h-full">
|
<div className="border border-gray-300 rounded-lg overflow-hidden" style={{ height: height || '100%' }}>
|
||||||
<Editor
|
<Editor
|
||||||
height="100%"
|
height="100%"
|
||||||
defaultLanguage="sql"
|
defaultLanguage="sql"
|
||||||
|
|||||||
Reference in New Issue
Block a user