From 0587281d9978f9a7da8d39f51b6d2f45311a31f1 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Wed, 24 Feb 2021 10:13:40 +0000 Subject: [PATCH] Streaming: Fixes an issue with time series panel and streaming data source when scrolling back from being out of view (#31431) (#31442) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Streaming: Fixes an issue with time series panel and streaming data source when scrolling back from being out of view * Slight tweak (cherry picked from commit 59c060f1f17c5285b4e0688f5d39e3e027983029) Co-authored-by: Torkel Ödegaard --- 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; }