1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fixing logs autoscroll behavior (#1720)

* Fixing autoscroll behavior

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Making statement simpler to read

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2020-12-09 21:03:16 +03:00 committed by GitHub
parent fc20b22bb5
commit 0facd34738
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,15 +95,9 @@ export class PodLogList extends React.Component<Props> {
@action
setLastLineVisibility = (props: ListOnScrollProps) => {
const { scrollHeight, clientHeight } = this.virtualListDiv.current;
const { scrollOffset, scrollDirection } = props;
const { scrollOffset } = props;
if (scrollDirection == "backward") {
this.isLastLineVisible = false;
} else {
if (clientHeight + scrollOffset === scrollHeight) {
this.isLastLineVisible = true;
}
}
this.isLastLineVisible = (clientHeight + scrollOffset) === scrollHeight;
};
/**