Skip to content

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.

fix: open log details on clicking on empty column cell too (#8618)

Yunus Mfa936a7e0d57
diff --git a/frontend/src/container/LogsExplorerList/InfinityTableView/TableRow.tsx b/frontend/src/container/LogsExplorerList/InfinityTableView/TableRow.tsx
index 1c591c1ef0..5977df8730 100644
--- a/frontend/src/container/LogsExplorerList/InfinityTableView/TableRow.tsx
+++ b/frontend/src/container/LogsExplorerList/InfinityTableView/TableRow.tsx
@@ -23,6 +23,7 @@ interface TableRowProps {
index: number;
log: Record<string, unknown>;
handleSetActiveContextLog: (log: ILog) => void;
+ onShowLogDetails: (log: ILog) => void;
logs: ILog[];
hasActions: boolean;
fontSize: FontSize;
@@ -33,6 +34,7 @@ export default function TableRow({
index,
log,
handleSetActiveContextLog,
+ onShowLogDetails,
logs,
hasActions,
fontSize,
@@ -57,6 +59,11 @@ export default function TableRow({
[currentLog, handleSetActiveContextLog],
);
+ const handleShowLogDetails = useCallback(() => {
+ if (!onShowLogDetails || !currentLog) return;
+ onShowLogDetails(currentLog);
+ }, [currentLog, onShowLogDetails]);
+
const hasSingleColumn =
tableColumns.filter((column) => column.key !== 'state-indicator').length ===
1;
@@ -89,6 +96,7 @@ export default function TableRow({
key={column.key}
fontSize={fontSize}
columnKey={column.key as string}
+ onClick={handleShowLogDetails}
>
{cloneElement(children, props)}
</TableCellStyled>
diff --git a/frontend/src/container/LogsExplorerList/InfinityTableView/index.tsx b/frontend/src/container/LogsExplorerList/InfinityTableView/index.tsx
index 339bdf135b..9a75359c84 100644
--- a/frontend/src/container/LogsExplorerList/InfinityTableView/index.tsx
+++ b/frontend/src/container/LogsExplorerList/InfinityTableView/index.tsx
@@ -108,6 +108,7 @@ const InfinityTable = forwardRef<TableVirtuosoHandle, InfinityTableProps>(
logs={tableViewProps.logs}
hasActions
fontSize={tableViewProps.fontSize}
+ onShowLogDetails={onSetActiveLog}
/>
),
[
@@ -115,6 +116,7 @@ const InfinityTable = forwardRef<TableVirtuosoHandle, InfinityTableProps>(
tableColumns,
tableViewProps.fontSize,
tableViewProps.logs,
+ onSetActiveLog,
],
);
@@ -146,12 +148,6 @@ const InfinityTable = forwardRef<TableVirtuosoHandle, InfinityTableProps>(
[tableColumns, isDarkMode, tableViewProps?.fontSize],
);
- const handleClickExpand = (index: number): void => {
- if (!onSetActiveLog) return;
-
- onSetActiveLog(tableViewProps.logs[index]);
- };
-
return (
<>
<TableVirtuoso
@@ -183,9 +179,6 @@ const InfinityTable = forwardRef<TableVirtuosoHandle, InfinityTableProps>(
{...(infitiyTableProps?.onEndReached
? { endReached: infitiyTableProps.onEndReached }
: {})}
- onClick={(event: any): void => {
- handleClickExpand(event.target.parentElement.parentElement.dataset.index);
- }}
/>
{activeContextLog && (