Further fix for dynamic variable deletion across different queries

This commit is contained in:
Rory Powell 2021-12-21 11:26:45 -05:00
parent ded3c2247b
commit e96467a7cd
1 changed files with 6 additions and 1 deletions

View File

@ -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) => {