Skip to content

Commit

Permalink
Show display_columns only
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBurgess committed Nov 24, 2024
1 parent 22ded81 commit de61c63
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
GroupingActions,
useDetectionGrouping,
} from "@powerpipe/hooks/useDetectionGrouping";
import { useDashboard } from "@powerpipe/hooks/useDashboard";
import { useMemo } from "react";

type DetectionChildrenProps = {
Expand Down Expand Up @@ -118,12 +119,17 @@ const getDetectionResultRowIconTitle = (total: number) => {
};

const DetectionResultRow = ({ result }: DetectionResultRowProps) => {
const { panelsMap } = useDashboard();
return (
<div className="flex bg-dashboard-panel print:bg-white last:rounded-b-md space-x-4 overflow-x-auto">
<Table
name={`${result.detection.name}.table`}
panel_type="table"
data={{ rows: result.rows, columns: result.columns }}
properties={{
display_columns:
panelsMap[result.detection.name]?.properties?.display_columns || [],
}}
filterEnabled
context={result.detection.name}
/>
Expand Down

0 comments on commit de61c63

Please sign in to comment.