adds new supportsMultiValueOperator property to AdHocFiltersVariable
adds new isMultiValueOperator method
adjusts _getOperators to conditionally return the new multi value operators depending on the value of supportsMultiValueOperator
modifies _updateFilter to take in a generic partial filter update
this allows for updating multiple keys at once! 🥳
adds supports for rendering a <MultiSelect> when a multi value operator is selected in AdHocFilterRenderer
adjusts the default renderFilter expression (which should produce a prometheus-compatible expression) to handle =| and !=| by converting to regex and joining with |
extends AdHocFiltersVariableUrlSyncHandler to handle multiple value/label pairs
modifies valueLabel to valueLabels so it can hold multiple labels
this bit feels a little messy/brittle imo 😕 any suggestions?
📦 Published PR as canary version: 5.11.0--canary.868.10613389161.0
:sparkles: Test out this PR locally via:
```bash
npm install @grafana/scenes-react@5.11.0--canary.868.10613389161.0
npm install @grafana/scenes@5.11.0--canary.868.10613389161.0
# or
yarn add @grafana/scenes-react@5.11.0--canary.868.10613389161.0
yarn add @grafana/scenes@5.11.0--canary.868.10613389161.0
```
supportsMultiValueOperator
property toAdHocFiltersVariable
isMultiValueOperator
method_getOperators
to conditionally return the new multi value operators depending on the value ofsupportsMultiValueOperator
_updateFilter
to take in a generic partial filter update<MultiSelect>
when a multi value operator is selected inAdHocFilterRenderer
renderFilter
expression (which should produce a prometheus-compatible expression) to handle=|
and!=|
by converting to regex and joining with|
AdHocFiltersVariableUrlSyncHandler
to handle multiple value/label pairsvalueLabel
tovalueLabels
so it can hold multiple labelsFor https://github.com/grafana/hyperion-planning/issues/1 For https://github.com/grafana/grafana/issues/85074
📦 Published PR as canary version:
5.11.0--canary.868.10613389161.0
:sparkles: Test out this PR locally via: ```bash npm install @grafana/scenes-react@5.11.0--canary.868.10613389161.0 npm install @grafana/scenes@5.11.0--canary.868.10613389161.0 # or yarn add @grafana/scenes-react@5.11.0--canary.868.10613389161.0 yarn add @grafana/scenes@5.11.0--canary.868.10613389161.0 ```