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 authored and GitHub committed 2020-12-09 21:03:16 +03:00
1 parent fc20b22bb5
commit 0facd34738
1 file changed
+2 -8
@@ -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;
};
/**