Skip to content

Commit 376427f

Browse files
chetverikovMaksim Chetverikov
andauthored
fix a bug with the follow and extraLine parameters (#52)
Co-authored-by: Maksim Chetverikov <maksim.chetverikov@01-484-mbp-16.local>
1 parent 26cd37c commit 376427f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/LazyLog/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ export default class LazyLog extends Component<LazyLogProps, LazyLogState> {
478478
// If follow is activated, and we're not currently searching, scroll to offset
479479
if (this.props.follow && !this.state.isSearching) {
480480
this.state.listRef?.current?.scrollToItem(
481-
this.state.scrollToIndex,
481+
this.state.scrollToIndex + (this.props?.extraLines || 0),
482482
"auto"
483483
);
484484
}
@@ -1181,7 +1181,7 @@ export default class LazyLog extends Component<LazyLogProps, LazyLogState> {
11811181
/>
11821182
)}
11831183

1184-
{/*
1184+
{/*
11851185
// @ts-ignore */}
11861186
<AutoSizer
11871187
disableHeight={this.props.height !== "auto"}
@@ -1232,7 +1232,7 @@ export default class LazyLog extends Component<LazyLogProps, LazyLogState> {
12321232
}
12331233
}}
12341234
>
1235-
{/*
1235+
{/*
12361236
// @ts-ignore */}
12371237
{this.renderRow}
12381238
</VariableSizeList>

0 commit comments

Comments
 (0)