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 Jari Kolehmainen committed 2020-12-11 13:22:09 +02:00
1 parent c76f6a79e8
commit c113a6030e
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;
};
/**