Skip to content

Commit

Permalink
make monaco editor respond to window resize
Browse files Browse the repository at this point in the history
fix #3223
  • Loading branch information
trinity-1686a committed May 4, 2024
1 parent b5e9bf2 commit 03f66ff
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export function QueryEditor(props: SearchComponentProps) {
runSearchRef.current(searchRequestRef.current);
},
})
const resize = () => {
editor.layout({width: Math.max(window.innerWidth - (260+180+2*24), 200), height: 84});
}
window.addEventListener('resize', resize);
}

useEffect(() => {
Expand Down

0 comments on commit 03f66ff

Please sign in to comment.