diff --git a/frontend/app/components/Dashboard/components/Alerts/AlertForm/NotifyHooks.tsx b/frontend/app/components/Dashboard/components/Alerts/AlertForm/NotifyHooks.tsx index 15f00a0a3..95efaaaf3 100644 --- a/frontend/app/components/Dashboard/components/Alerts/AlertForm/NotifyHooks.tsx +++ b/frontend/app/components/Dashboard/components/Alerts/AlertForm/NotifyHooks.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Checkbox } from 'UI'; import DropdownChips from '../DropdownChips'; +import { observer } from 'mobx-react-lite' interface INotifyHooks { instance: Alert; @@ -128,4 +129,4 @@ function NotifyHooks({ ); } -export default NotifyHooks; +export default observer(NotifyHooks); diff --git a/frontend/app/components/Dashboard/components/Alerts/NewAlert.tsx b/frontend/app/components/Dashboard/components/Alerts/NewAlert.tsx index aa6c18714..258b550cd 100644 --- a/frontend/app/components/Dashboard/components/Alerts/NewAlert.tsx +++ b/frontend/app/components/Dashboard/components/Alerts/NewAlert.tsx @@ -88,7 +88,7 @@ const NewAlert = (props: IProps) => { init({}); if (list.length === 0) fetchList(); fetchTriggerOptions(); - fetchWebhooks(); + void fetchWebhooks(); }, []); useEffect(() => { diff --git a/frontend/app/mstore/alertsStore.ts b/frontend/app/mstore/alertsStore.ts index da83610c6..d377af81e 100644 --- a/frontend/app/mstore/alertsStore.ts +++ b/frontend/app/mstore/alertsStore.ts @@ -71,7 +71,10 @@ export default class AlertsStore { edit = (diff: Partial) => { const key = Object.keys(diff)[0] + const oldInst = this.instance // @ts-ignore - this.instance[key] = diff[key] + oldInst[key] = diff[key] + + this.instance = oldInst } }