fix(editor): portal SQL hover tooltips above result panes
This commit is contained in:
3 files changed
+79
-2
No files matched your search
@@ -3439,7 +3439,7 @@ onMounted(async () => {
|
||||
})();
|
||||
|
||||
const [
|
||||
{ EditorView, keymap, rectangularSelection, hoverTooltip, showTooltip, closeHoverTooltips, Decoration, gutter, GutterMarker, lineNumberMarkers, lineNumbers, highlightActiveLineGutter, highlightSpecialChars, drawSelection, dropCursor, crosshairCursor, scrollPastEnd, ViewPlugin },
|
||||
{ EditorView, keymap, rectangularSelection, hoverTooltip, showTooltip, closeHoverTooltips, Decoration, tooltips, gutter, GutterMarker, lineNumberMarkers, lineNumbers, highlightActiveLineGutter, highlightSpecialChars, drawSelection, dropCursor, crosshairCursor, scrollPastEnd, ViewPlugin },
|
||||
{ EditorState, EditorSelection, Compartment, Prec, RangeSet, StateEffect, StateField },
|
||||
langSql,
|
||||
{ autocompletion, startCompletion, acceptCompletion, closeBrackets, closeBracketsKeymap, snippetCompletion, completionStatus, completionKeymap, insertCompletionText, nextSnippetField },
|
||||
@@ -3854,6 +3854,7 @@ onMounted(async () => {
|
||||
{ decorations: (v) => v.decorations },
|
||||
);
|
||||
|
||||
const tooltipParent = editorRef.value.closest<HTMLElement>("#root") ?? editorRef.value;
|
||||
const state = EditorState.create({
|
||||
doc: props.modelValue,
|
||||
selection: normalizedEditorSelection(props.initialSelection, props.modelValue.length),
|
||||
@@ -3902,6 +3903,7 @@ onMounted(async () => {
|
||||
keymap.of([...defaultKeymap, ...searchKeymap, ...historyKeymap, ...foldKeymap, ...completionKeymap]),
|
||||
sqlLanguageComp.of(buildSqlLanguageExtension()),
|
||||
sqlSemanticHighlightComp.of(buildSqlSemanticHighlightExtension()),
|
||||
tooltips({ parent: tooltipParent }),
|
||||
completionComp.of(buildSqlCompletionExtension()),
|
||||
sqlCompletionTheme(EditorView),
|
||||
codeMirrorTheme.of(theme),
|
||||
|
||||
Reference in new issue
Block a user