diff --git a/src/components/Notifications/Rules/notificationsRulesTableColumns.tsx b/src/components/Notifications/Rules/notificationsRulesTableColumns.tsx index ec71807d8..2eb9644fa 100644 --- a/src/components/Notifications/Rules/notificationsRulesTableColumns.tsx +++ b/src/components/Notifications/Rules/notificationsRulesTableColumns.tsx @@ -8,6 +8,7 @@ import { formatDuration } from "@flanksource-ui/utils/date"; import { atom, useAtom } from "jotai"; import { MRT_ColumnDef } from "mantine-react-table"; import { useState } from "react"; +import { createPortal } from "react-dom"; import { FaExclamationTriangle } from "react-icons/fa"; import { Tooltip } from "react-tooltip"; import JobHistoryStatusColumn from "../../JobsHistory/JobHistoryStatusColumn"; @@ -193,7 +194,6 @@ export const notificationsRulesTableColumns: MRT_ColumnDef[] <> { e.stopPropagation(); e.preventDefault(); @@ -202,7 +202,15 @@ export const notificationsRulesTableColumns: MRT_ColumnDef[] > - + {createPortal( + +
{error}
+
, + document.body + )} [] return ( <>
0 ? notification.most_common_error : undefined - } onClick={(e) => { if (notification.most_common_error) { e.stopPropagation(); @@ -273,7 +277,18 @@ export const notificationsRulesTableColumns: MRT_ColumnDef[] > {value}
- {value > 0 && } + {value > 0 && + createPortal( + +
+                    {notification.most_common_error}
+                  
+
, + document.body + )} ); }