From 59c060f1f17c5285b4e0688f5d39e3e027983029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 24 Feb 2021 11:12:11 +0100 Subject: [PATCH] Streaming: Fixes an issue with time series panel and streaming data source when scrolling back from being out of view (#31431) * Streaming: Fixes an issue with time series panel and streaming data source when scrolling back from being out of view * Slight tweak --- public/app/features/dashboard/dashgrid/PanelChrome.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/app/features/dashboard/dashgrid/PanelChrome.tsx b/public/app/features/dashboard/dashgrid/PanelChrome.tsx index 47bc5d63d22..8b4b3a79aad 100644 --- a/public/app/features/dashboard/dashgrid/PanelChrome.tsx +++ b/public/app/features/dashboard/dashgrid/PanelChrome.tsx @@ -136,9 +136,12 @@ export class PanelChrome extends Component { // So in this context we can only do a single call to setState onDataUpdate(data: PanelData) { if (!this.props.isInView) { - // Ignore events when not visible. - // The call will be repeated when the panel comes into view - this.setState({ refreshWhenInView: true }); + if (data.state !== LoadingState.Streaming) { + // Ignore events when not visible. + // The call will be repeated when the panel comes into view + this.setState({ refreshWhenInView: true }); + } + return; }