Release Notes
Variables: Notify scene after each variable completion or value change (#525)
VariableDependencyConfigLike interface has changed so that scene objects now get notified after each variable update is completed (or changed value). Before, the SceneVariableSet waited for all variables to complete before notifying scene objects.
The function variableUpdatesCompleted has changed name and signature:
variableUpdateCompleted(variable: SceneVariable, hasChanged: boolean): void;VariableDependencyConfig has also some breaking changes. The function named onVariableUpdatesCompleted has changed name and signature to:
onVariableUpdateCompleted?: () => void;VariableDependencyConfig now handles the state logic for "waitingForVariables". If you call VariableDependencyConfig.hasDependencyInLoadingState and it returns true it will remember this waiting state and call onVariableUpdateCompleted as soon as the next variable update is completed, no matter if that variable is a dependency or if it changed or not.
💥 Breaking Change
@grafana/scenes
🚀 Enhancement
Authors: 1
- Torkel Ödegaard (@torkelo)