scroll logs
This commit is contained in:
parent
47e5a57806
commit
707267bdaa
|
|
@ -263,6 +263,12 @@ const LogsContainer = define('LogsContainer', {
|
||||||
color: theme('colors-textMuted'),
|
color: theme('colors-textMuted'),
|
||||||
maxHeight: 200,
|
maxHeight: 200,
|
||||||
overflow: 'auto',
|
overflow: 'auto',
|
||||||
|
|
||||||
|
render({ props: { children }, parts: { Root } }) {
|
||||||
|
return <Root ref={(el: HTMLElement | null) => {
|
||||||
|
if (el) requestAnimationFrame(() => el.scrollTop = el.scrollHeight)
|
||||||
|
}}>{children}</Root>
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const LogLine = define('LogLine', {
|
const LogLine = define('LogLine', {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user