From af9690ce77954040266af840a57553f7d703076e Mon Sep 17 00:00:00 2001 From: Joanne Wang Date: Mon, 28 Oct 2024 15:10:42 -0700 Subject: [PATCH] fix data source picker for alerts card Signed-off-by: Joanne Wang --- public/components/DataSourceAlertsCard/DataSourceAlertsCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/components/DataSourceAlertsCard/DataSourceAlertsCard.tsx b/public/components/DataSourceAlertsCard/DataSourceAlertsCard.tsx index 00b2e395..77f9089c 100644 --- a/public/components/DataSourceAlertsCard/DataSourceAlertsCard.tsx +++ b/public/components/DataSourceAlertsCard/DataSourceAlertsCard.tsx @@ -49,7 +49,7 @@ export const DataSourceAlertsCard: React.FC = ({ get }, [dataSource]); const onDataSourceSelected = useCallback((options: any[]) => { - if (dataSource?.id !== undefined && dataSource?.id !== options[0]?.id) { + if (dataSource?.id === undefined || dataSource?.id !== options[0]?.id) { setDataSource(options[0]); } }, [dataSource]);