Skip to content
10 changes: 9 additions & 1 deletion src/components/AutoScrollArea.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { css } from '@emotion/react'
import { ScrollArea, ScrollAreaProps } from '@radix-ui/themes'
import { ReactNode, UIEvent, useRef } from 'react'

Expand Down Expand Up @@ -50,7 +51,14 @@ export function AutoScrollArea({

return (
<ScrollArea {...props} onScroll={handleScroll}>
<div ref={handleMount}>{children}</div>
<div
ref={handleMount}
css={css`
height: 100%;
`}
Comment thread
allansson marked this conversation as resolved.
>
{children}
</div>
</ScrollArea>
)
}
11 changes: 9 additions & 2 deletions src/components/Validator/ExecutionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Check, LogEntry } from '@/schemas/k6'
import { ReadOnlyEditor } from '../Monaco/ReadOnlyEditor'

import { ChecksSection } from './ChecksSection'
import { LogsSection } from './LogsSection'
import { LogsSection, useConsoleFilter } from './LogsSection'

interface ExecutionDetailsProps {
isRunning: boolean
Expand All @@ -27,6 +27,8 @@ export function ExecutionDetails({
script !== undefined ? 'script' : 'logs'
)

const consoleFilter = useConsoleFilter()

const handleTabChange = (value: string) => {
if (value !== 'logs' && value !== 'checks' && value !== 'script') {
return
Expand Down Expand Up @@ -74,7 +76,12 @@ export function ExecutionDetails({
min-height: 0;
`}
>
<LogsSection logs={logs} autoScroll={isRunning} />
<LogsSection
{...consoleFilter}
autoScroll={isRunning}
browser={false}
logs={logs}
/>
</Tabs.Content>
{script !== undefined && (
<Tabs.Content
Expand Down
Loading
Loading