Release Notes
AdHocFiltersSet/Variable: Unify both objects as a scene variable (breaking change) (#586)
AdHocFilterSet is now removed from the library. AdHocFiltersVariable can now be used in both modes (auto and manual).
To migrate replace AdHocFilterSet with AdHocFiltersVariable , the applyMode defaults to auto which is the new renamed value that was previously same-datasource. Instead of adding this directly to a controls array add it to the variables array of a SceneVariableSet. It will then be rendered along with other variables via the VariableValueSelectors controls component. If you want to render ad hoc filters separately you can set hide: VariableHide.hideVariable so that the filters are not rendered by VariableValueSelectors and use the new component VariableValueControl that can render a specific variable.
AdHocFiltersVariable.create is also removed as this separate factory function is no longer needed. If you where using AdHocFiltersVariable.create then switch to the normal constructor but be sure to pass in applyMode: 'manual' when you create it to preserve the same behavior as before.
💥 Breaking Change
@grafana/scenes- AdHocFiltersSet/Variable: Unify both objects as a scene variable (breaking change) #586 (@torkelo @ivanortegaalba @dprokop)
Authors: 3
- Dominik Prokop (@dprokop)
- Ivan Ortega Alba (@ivanortegaalba)
- Torkel Ödegaard (@torkelo)