Alerting: Fix UI bug when setting custom notification policy group by (#54607)

Custom values were not being displayed in the multiselect for notification policy `Group by` even though
they were correctly being saved.
pull/53074/head^2
Matthew Jacobson 3 years ago committed by GitHub
parent e17c2f1cb5
commit d706320d0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      public/app/features/alerting/unified/components/amroutes/AmRootRouteForm.tsx
  2. 2
      public/app/features/alerting/unified/components/amroutes/AmRoutesExpandedForm.tsx

@ -87,7 +87,7 @@ export const AmRootRouteForm: FC<AmRootRouteFormProps> = ({
setValue('groupBy', [...field.value, opt]);
}}
onChange={(value) => onChange(mapMultiSelectValueToStrings(value))}
options={[...commonGroupByOptions, groupByOptions]}
options={[...commonGroupByOptions, ...groupByOptions]}
/>
)}
control={control}

@ -180,7 +180,7 @@ export const AmRoutesExpandedForm: FC<AmRoutesExpandedFormProps> = ({ onCancel,
setValue('groupBy', [...field.value, opt]);
}}
onChange={(value) => onChange(mapMultiSelectValueToStrings(value))}
options={[...commonGroupByOptions, groupByOptions]}
options={[...commonGroupByOptions, ...groupByOptions]}
/>
)}
control={control}

Loading…
Cancel
Save