Further fix for dynamic variable deletion across different queries
This commit is contained in:
parent
006df467cd
commit
70e19d40bc
|
@ -208,7 +208,12 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return variables
|
|
||||||
|
let existing = datasource?.config?.dynamicVariables || []
|
||||||
|
// remove existing query variables (for changes and deletions)
|
||||||
|
existing = existing.filter(variable => variable.queryId !== queryId)
|
||||||
|
// re-add the new query variables
|
||||||
|
return [...existing, ...variables]
|
||||||
}
|
}
|
||||||
|
|
||||||
const shouldShowVariables = (dynamicVariables, variablesReadOnly) => {
|
const shouldShowVariables = (dynamicVariables, variablesReadOnly) => {
|
||||||
|
|
Loading…
Reference in New Issue