Add comment explaining reset in silences editor

This commit is contained in:
Tom Ratcliffe 2024-04-26 09:45:00 +01:00 committed by Tom Ratcliffe
parent df5c62b8ad
commit f419c9b53a

View File

@ -139,6 +139,7 @@ export const SilencesEditor = ({ silenceId, alertManagerSourceName }: Props) =>
const matcherFields = watch('matchers');
useEffect(() => {
// Allows the form to correctly initialise when an existing silence is fetch from the backend
reset(getDefaultFormValues(urlSearchParams, silence));
}, [reset, silence, urlSearchParams]);