File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
extensions/ql-vscode/src/view/results Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ export function RawTable({
4242 TableItem | undefined
4343 > ( ) ;
4444
45- const scroller = React . useMemo ( ( ) => new ScrollIntoViewHelper ( ) , [ ] ) ;
46- React . useEffect ( ( ) => scroller . update ( ) ) ;
45+ const scroller = React . useRef ( new ScrollIntoViewHelper ( ) ) ;
46+ React . useEffect ( ( ) => scroller . current . update ( ) ) ;
4747
4848 const setSelection = React . useCallback (
4949 ( row : number , column : number ) : void => {
@@ -80,7 +80,7 @@ export function RawTable({
8080 jumpToLocation ( location , databaseUri ) ;
8181 }
8282 }
83- scroller . scrollIntoViewOnNextUpdate ( ) ;
83+ scroller . current . scrollIntoViewOnNextUpdate ( ) ;
8484 return { row : nextRow , column : nextColumn } ;
8585 } ) ;
8686 } ,
@@ -141,7 +141,7 @@ export function RawTable({
141141 selectedItem ?. row === rowIndex ? selectedItem ?. column : undefined
142142 }
143143 onSelected = { setSelection }
144- scroller = { scroller }
144+ scroller = { scroller . current }
145145 />
146146 ) ) ;
147147
You can’t perform that action at this time.
0 commit comments