query - saving to local storage

This commit is contained in:
Jan Prochazka
2020-04-04 21:22:30 +02:00
parent 93cacafa4b
commit 3df4e9b7dc
6 changed files with 60 additions and 21 deletions

View File

@@ -33,8 +33,7 @@ export default function SqlEditor({
const editorRef = React.useRef(null);
React.useEffect(() => {
console.log('editorRef.current', editorRef.current);
if (tabVisible) editorRef.current.editor.focus();
if (tabVisible && editorRef.current && editorRef.current.editor) editorRef.current.editor.focus();
}, [tabVisible]);
return (
<Wrapper ref={containerRef}>