SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
fix: updated the form value on mount (#4076)
Palash Gupta16839eb7d3ae
diff --git a/frontend/src/container/EditAlertChannels/index.tsx b/frontend/src/container/EditAlertChannels/index.tsxindex ca8bc96f7f..58401bb48e 100644--- a/frontend/src/container/EditAlertChannels/index.tsx+++ b/frontend/src/container/EditAlertChannels/index.tsx@@ -22,7 +22,7 @@ import {import FormAlertChannels from 'container/FormAlertChannels';import { useNotifications } from 'hooks/useNotifications';import history from 'lib/history';-import { useCallback, useState } from 'react';+import { useCallback, useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';import { useParams } from 'react-router-dom';@@ -57,6 +57,12 @@ function EditAlertChannels({setType(value as ChannelType);}, []);+ useEffect(() => {+ formInstance.setFieldsValue({+ ...initialValue,+ });+ }, [formInstance, initialValue]);+const prepareSlackRequest = useCallback(() => ({api_url: selectedConfig?.api_url || '',diff --git a/frontend/src/pages/ChannelsEdit/index.tsx b/frontend/src/pages/ChannelsEdit/index.tsxindex 9a2c10b4f5..8a578c06e0 100644--- a/frontend/src/pages/ChannelsEdit/index.tsx+++ b/frontend/src/pages/ChannelsEdit/index.tsx@@ -18,7 +18,7 @@ function ChannelsEdit(): JSX.Element {const { id } = useParams<Params>();const { t } = useTranslation();- const { isLoading, isError, data } = useQuery(['getChannel', id], {+ const { isFetching, isError, data } = useQuery(['getChannel', id], {queryFn: () =>get({id,@@ -29,7 +29,7 @@ function ChannelsEdit(): JSX.Element {return <Typography>{data?.error || t('something_went_wrong')}</Typography>;}- if (isLoading || !data?.payload) {+ if (isFetching || !data?.payload) {return <Spinner tip="Loading Channels..." />;}