Skip to content

Commit

Permalink
[Actionable Observability][ResponseOps] Fix alert tab crash on rule d…
Browse files Browse the repository at this point in the history
…etails page (#139372)
  • Loading branch information
maryam-saeidi authored Aug 25, 2022
1 parent 3e7ece1 commit e1e9a1a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ const AlertsTable: React.FunctionComponent<AlertsTableProps> = (props: AlertsTab
</EuiFlexItem>
)}
{renderCustomActionsRow &&
alerts[visibleRowIndex] &&
renderCustomActionsRow(alerts[visibleRowIndex], handleFlyoutAlert, props.id)}
</EuiFlexGroup>
);
Expand Down Expand Up @@ -184,7 +185,7 @@ const AlertsTable: React.FunctionComponent<AlertsTableProps> = (props: AlertsTab
]);

useEffect(() => {
// Row classes do not deal with visible row indices so we need to handle page offset
// Row classes do not deal with visible row indices, so we need to handle page offset
const rowIndex = flyoutAlertIndex + pagination.pageIndex * pagination.pageSize;
setRowClasses({
[rowIndex]: ACTIVE_ROW_CLASS,
Expand All @@ -201,7 +202,6 @@ const AlertsTable: React.FunctionComponent<AlertsTableProps> = (props: AlertsTab
columnId: string;
}) => {
const value = data.find((d) => d.field === columnId)?.value ?? [];
// console.log({ data, columnId })
return <>{value.length ? value.join() : '--'}</>;
};

Expand Down

0 comments on commit e1e9a1a

Please sign in to comment.