mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
fix(sqllab): scroll position after run current sql (#24965)
This commit is contained in:
parent
025e4d4772
commit
155cf54c15
@ -343,6 +343,7 @@ const SqlEditor = ({
|
|||||||
const session = editor.getSession();
|
const session = editor.getSession();
|
||||||
const cursorPosition = editor.getCursorPosition();
|
const cursorPosition = editor.getCursorPosition();
|
||||||
const totalLine = session.getLength();
|
const totalLine = session.getLength();
|
||||||
|
const currentRow = editor.getFirstVisibleRow();
|
||||||
let end = editor.find(';', {
|
let end = editor.find(';', {
|
||||||
backwards: false,
|
backwards: false,
|
||||||
skipCurrent: true,
|
skipCurrent: true,
|
||||||
@ -390,6 +391,7 @@ const SqlEditor = ({
|
|||||||
startQuery();
|
startQuery();
|
||||||
editor.selection.clearSelection();
|
editor.selection.clearSelection();
|
||||||
editor.moveCursorToPosition(cursorPosition);
|
editor.moveCursorToPosition(cursorPosition);
|
||||||
|
editor.scrollToRow(currentRow);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user