Panel Header: Add CancelQuery option to panel header (#64796)

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
This commit is contained in:
Alexa V
2023-03-16 13:56:58 +01:00
committed by GitHub
parent 10db808ea1
commit fef0ee913c
9 changed files with 67 additions and 63 deletions

View File

@@ -317,8 +317,11 @@ export class PanelQueryRunner {
this.subscription.unsubscribe();
// If we have an old result with loading state, send it with done state
if (this.lastResult && this.lastResult.state === LoadingState.Loading) {
// If we have an old result with loading or streaming state, send it with done state
if (
this.lastResult &&
(this.lastResult.state === LoadingState.Loading || this.lastResult.state === LoadingState.Streaming)
) {
this.subject.next({
...this.lastResult,
state: LoadingState.Done,