Skip to content

Commit

Permalink
fix list display in output inspection (#2409)
Browse files Browse the repository at this point in the history
create an object for basic array types in output inspection
  • Loading branch information
anovazzi1 authored Jun 28, 2024
2 parents d629ff2 + e137362 commit cfdfa0f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/frontend/src/components/dataOutputComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ function DataOutputComponent({
columnMode = "union",
}: {
pagination: boolean;
rows: any;
rows: any[];
columnMode?: "intersection" | "union";
}) {
// If the rows are not an array of objects, convert them to an array of objects
if (rows.some((row) => typeof row !== "object")) {
rows = rows.map((row) => ({ data: row }));
}

const columns = extractColumnsFromRows(rows, columnMode);

const columnDefs = columns.map((col, idx) => ({
Expand Down

0 comments on commit cfdfa0f

Please sign in to comment.