mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Logs: Fix scrolling with exploreScrollableLogsContainer
feature (#73272)
fix scrolling with `exploreScrollableLogsContainer`
This commit is contained in:
parent
57d8997b86
commit
98b3878231
@ -454,7 +454,18 @@ class UnthemedLogs extends PureComponent<Props, State> {
|
|||||||
return { from: firstTimeStamp, to: lastTimeStamp };
|
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() {
|
render() {
|
||||||
const {
|
const {
|
||||||
|
Loading…
Reference in New Issue
Block a user