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

View File

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