@grafana/plugin-ui 0.17.6 → 0.17.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.cjs
CHANGED
|
@@ -29038,6 +29038,7 @@ function getRequestLooper(req, options) {
|
|
|
29038
29038
|
return new Observable((subscriber) => {
|
|
29039
29039
|
let nextQuery = void 0;
|
|
29040
29040
|
let subscription = void 0;
|
|
29041
|
+
let timeoutId = void 0;
|
|
29041
29042
|
let loadingState = data.LoadingState.Loading;
|
|
29042
29043
|
let nextRequestDelay = 1;
|
|
29043
29044
|
let count = 1;
|
|
@@ -29081,7 +29082,7 @@ function getRequestLooper(req, options) {
|
|
|
29081
29082
|
}
|
|
29082
29083
|
if (nextQuery) {
|
|
29083
29084
|
const next = nextQuery;
|
|
29084
|
-
setTimeout(() => {
|
|
29085
|
+
timeoutId = setTimeout(() => {
|
|
29085
29086
|
subscription = options.query({ ...req, requestId: `${req.requestId}.${++count}`, targets: [next] }).subscribe(observer);
|
|
29086
29087
|
nextQuery = void 0;
|
|
29087
29088
|
}, nextRequestDelay * DELAY_INTERVAL_MS);
|
|
@@ -29092,7 +29093,8 @@ function getRequestLooper(req, options) {
|
|
|
29092
29093
|
};
|
|
29093
29094
|
subscription = options.query(req).subscribe(observer);
|
|
29094
29095
|
return function unsubscribe() {
|
|
29095
|
-
|
|
29096
|
+
clearTimeout(timeoutId);
|
|
29097
|
+
subscription == null ? void 0 : subscription.unsubscribe();
|
|
29096
29098
|
if (nextQuery || shouldCancel) {
|
|
29097
29099
|
options.onCancel();
|
|
29098
29100
|
}
|