From 390846c85f13818b629667f5d571a3366158c3df Mon Sep 17 00:00:00 2001 From: anik-ghosh-au7 Date: Sun, 17 Jul 2022 13:38:18 +0530 Subject: [PATCH] update: webhooks --- dashboard/src/components/UpdateWebhookModal.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dashboard/src/components/UpdateWebhookModal.tsx b/dashboard/src/components/UpdateWebhookModal.tsx index 80df822..52fc67c 100644 --- a/dashboard/src/components/UpdateWebhookModal.tsx +++ b/dashboard/src/components/UpdateWebhookModal.tsx @@ -227,6 +227,7 @@ const UpdateWebhookModal = ({ [WebhookInputDataFields.ENDPOINT]: webhook[WebhookInputDataFields.ENDPOINT], [WebhookInputDataFields.ENABLED]: webhook[WebhookInputDataFields.ENABLED], + [WebhookInputDataFields.HEADERS]: {}, }; if (webhook[WebhookInputDataFields.HEADERS].length) { const headers = webhook[WebhookInputDataFields.HEADERS].reduce( @@ -311,7 +312,10 @@ const UpdateWebhookModal = ({ .map(() => ({ ...initHeadersValidatorData })), }); } else { - setWebhook({ ...rest, [WebhookInputDataFields.HEADERS]: [] }); + setWebhook({ + ...rest, + [WebhookInputDataFields.HEADERS]: [{ ...initHeadersData }], + }); } } }, [view]);