diff --git a/packages/scenes/src/variables/variants/MultiValueVariable.ts b/packages/scenes/src/variables/variants/MultiValueVariable.ts index b0c4df801..1745dfa61 100644 --- a/packages/scenes/src/variables/variants/MultiValueVariable.ts +++ b/packages/scenes/src/variables/variants/MultiValueVariable.ts @@ -325,14 +325,14 @@ export abstract class MultiValueVariable(this, state); } - public getOptionsForSelect(): VariableValueOption[] { + public getOptionsForSelect(includeCurrentValue = true): VariableValueOption[] { let options = this.state.options; if (this.state.includeAll) { options = [{ value: ALL_VARIABLE_VALUE, label: ALL_VARIABLE_TEXT }, ...options]; } - if (!Array.isArray(this.state.value)) { + if (includeCurrentValue && !Array.isArray(this.state.value)) { const current = options.find((x) => x.value === this.state.value); if (!current) { options = [{ value: this.state.value, label: String(this.state.text) }, ...options];