Lock to top when live updating

pull/10616/head
Brandon Farmer 2018-07-13 14:39:48 -07:00
parent dcedf747e8
commit 59d7968ea2
2 changed files with 7 additions and 3 deletions

View File

@ -101,7 +101,7 @@ class LogsTable extends Component<Props, State> {
scrollTop = 0
}
if (scrollToRow) {
if (_.isNumber(scrollToRow)) {
scrollTop = calculateScrollTop(scrollToRow)
}
@ -285,7 +285,7 @@ class LogsTable extends Component<Props, State> {
},
}
if (scrollToRow) {
if (_.isNumber(scrollToRow)) {
result.scrollToRow = scrollToRow
}

View File

@ -214,6 +214,10 @@ class LogsPage extends Component<Props, State> {
}
private get tableScrollToRow() {
if (this.liveUpdatingStatus === LiveUpdating.Play) {
return 0
}
if (this.loadingNewer && this.props.newRowsAdded) {
this.loadingNewer = false
return this.props.newRowsAdded || 0
@ -285,7 +289,7 @@ class LogsPage extends Component<Props, State> {
}
private get isSpecificTimeRange(): boolean {
return !!getDeep(this.props, 'timeRange.upper', false)
return !!getDeep(this.props, 'tableTime.custom', false)
}
private startUpdating = () => {