Streaming: Fixes an issue with time series panel and streaming data source when scrolling back from being out of view (#31431) (#31442)
* 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 59c060f1f1)
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
This commit is contained in:
co-authored by
Torkel Ödegaard
parent
beff0fbda8
commit
0587281d99
@@ -136,9 +136,12 @@ export class PanelChrome extends Component<Props, State> {
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user