Skip to content

Commit

Permalink
add schema to the extension
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Sep 10, 2024
1 parent cc14c93 commit 7aee662
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/gui/sql-editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ const SqlEditor = forwardRef<ReactCodeMirrorRef, SqlEditorProps>(
} else {
sqlDialect = sql({
dialect: MySQLDialect,
schema,
});
}

Expand All @@ -153,7 +154,13 @@ const SqlEditor = forwardRef<ReactCodeMirrorRef, SqlEditorProps>(
if (onCursorChange) onCursorChange(pos, lineNumber, columnNumber);
}),
].filter(Boolean) as Extension[];
}, [dialect, onCursorChange]);
}, [
dialect,
onCursorChange,
keyExtensions,
schema,
tableNameHighlightPlugin,
]);

return (
<CodeMirror
Expand Down

0 comments on commit 7aee662

Please sign in to comment.