AzureMonitor: Correctly update subscriptions value in ARG editor (#55860) (#55911)

* Correctly update subscriptions prop in query

* Simplify setting of subscriptions value

(cherry picked from commit 37aa45001f)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2022-09-28 07:12:16 -04:00
committed by GitHub
co-authored by Andreas Christou
parent d5d2654dc5
commit ce6aaa1a37
@@ -56,9 +56,10 @@ const SubscriptionField: React.FC<SubscriptionFieldProps> = ({
return;
}
query.subscriptions = change.map((c) => c.value ?? '');
onQueryChange(query);
onQueryChange({
...query,
subscriptions: change.map((c) => c.value ?? ''),
});
},
[query, onQueryChange]
);