Logs: Fix scrolling with `exploreScrollableLogsContainer` feature (#73272)

fix scrolling with `exploreScrollableLogsContainer`
pull/72011/head
Sven Grossmann 2 years ago committed by GitHub
parent 57d8997b86
commit 98b3878231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      public/app/features/explore/Logs/Logs.tsx

@ -454,7 +454,18 @@ class UnthemedLogs extends PureComponent<Props, State> {
return { from: firstTimeStamp, to: lastTimeStamp };
});
scrollToTopLogs = () => this.topLogsRef.current?.scrollIntoView();
scrollToTopLogs = () => {
if (config.featureToggles.exploreScrollableLogsContainer) {
if (this.logsContainer.current) {
this.logsContainer.current.scroll({
behavior: 'auto',
top: 0,
});
}
} else {
this.topLogsRef.current?.scrollIntoView();
}
};
render() {
const {

Loading…
Cancel
Save