From 1baf7cb958c23026d8f726dec949427a81c9bcd0 Mon Sep 17 00:00:00 2001 From: "J.C. Zhong" Date: Tue, 3 Dec 2024 23:59:58 +0000 Subject: [PATCH] fix: scroll the current search result into view --- .../webapp/hooks/queryEditor/extensions/useSearchExtension.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/querybook/webapp/hooks/queryEditor/extensions/useSearchExtension.ts b/querybook/webapp/hooks/queryEditor/extensions/useSearchExtension.ts index e2e0d425a..f184e8122 100644 --- a/querybook/webapp/hooks/queryEditor/extensions/useSearchExtension.ts +++ b/querybook/webapp/hooks/queryEditor/extensions/useSearchExtension.ts @@ -75,6 +75,7 @@ export const useSearchExtension = ({ if (shouldHighlight) { editorView?.dispatch({ selection: EditorSelection.single(item.from, item.to), + effects: EditorView.scrollIntoView(item.from), }); } else { editorView?.dispatch({