Fixing autoscroll behavior

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2020-12-09 16:03:15 +03:00
1 parent fc20b22bb5
commit 939035a16f
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;
};
/**