Move console scroll to useDidUpdate
This commit is contained in:
parent
f1b2cb5ee0
commit
ba0794ab5a
1 changed files with 2 additions and 2 deletions
|
@ -87,8 +87,8 @@ const Console = () => {
|
||||||
}, [theme, fontSize]);
|
}, [theme, fontSize]);
|
||||||
|
|
||||||
const cm = useRef({});
|
const cm = useRef({});
|
||||||
const scrollConsoleDown = () => { cm.current.scrollTop = cm.current.scrollHeight; console.log('scroll'); };
|
|
||||||
scrollConsoleDown();
|
useDidUpdate(() => { cm.current.scrollTop = cm.current.scrollHeight; });
|
||||||
|
|
||||||
const consoleClass = classNames({
|
const consoleClass = classNames({
|
||||||
'preview-console': true,
|
'preview-console': true,
|
||||||
|
|
Loading…
Reference in a new issue