Initializes alert form with existing values (for editing) (#65926)

This commit is contained in:
Jason Rhodes 2020-05-11 09:56:37 -04:00 committed by GitHub
parent b180fd378d
commit 0ae5e24d01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,7 +129,7 @@ export const Editor: React.FC<Props> = props => {
const { sourceStatus } = useLogSourceContext();
useMount(() => {
for (const [key, value] of Object.entries(DEFAULT_EXPRESSION)) {
for (const [key, value] of Object.entries({ ...DEFAULT_EXPRESSION, ...alertParams })) {
setAlertParams(key, value);
setHasSetDefaults(true);
}