grafana / scenes

Build Grafana dashboards directly in your Grafana app plugins.
https://grafana.com/developers/scenes
Apache License 2.0
133 stars 20 forks source link

MultiValueVariable: Fixes issue when value is all value but all value is not enabled #757

Closed torkelo closed 4 months ago

torkelo commented 4 months ago

Adds logic for a special case when current value is the ALL_VALUE but the variable has not enabled all value, in this case we should just pick the first option.

Refactored the validation function a bit so we can simplify the long nested if/else statements and leverage early return pattern instead.

Fixes https://github.com/grafana/grafana/issues/88391

📦 Published PR as canary version: 4.24.2--canary.757.9283024412.0
:sparkles: Test out this PR locally via: ```bash npm install @grafana/scenes@4.24.2--canary.757.9283024412.0 # or yarn add @grafana/scenes@4.24.2--canary.757.9283024412.0 ```
ivanortegaalba commented 4 months ago

I tested locally, and the issue was solved 👍

grafanabot commented 4 months ago

:rocket: PR was released in v4.24.2 :rocket: