mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Templating: Fixed recursive url update issue for textbox variable (#26981)
* Templating: Fixed recursive url update issue for textbox variable * Updated link * updated e2e
This commit is contained in:
@@ -82,9 +82,13 @@ export class BridgeSrv {
|
||||
});
|
||||
}
|
||||
|
||||
// Check for template variable changes on a dashboard
|
||||
if (state.location.path === this.lastPath) {
|
||||
// if only query params changed, check if variables changed
|
||||
if (state.location.path === this.lastPath && state.location.query !== this.lastQuery) {
|
||||
// Find template variable changes
|
||||
const changes = findTemplateVarChanges(state.location.query, this.lastQuery);
|
||||
// Store current query params to avoid recursion
|
||||
this.lastQuery = state.location.query;
|
||||
|
||||
if (changes) {
|
||||
const dash = getDashboardSrv().getCurrent();
|
||||
if (dash) {
|
||||
@@ -93,8 +97,8 @@ export class BridgeSrv {
|
||||
}
|
||||
}
|
||||
|
||||
this.lastQuery = state.location.query;
|
||||
this.lastPath = state.location.path;
|
||||
this.lastQuery = state.location.query;
|
||||
this.lastUrl = state.location.url;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user