refactor name props

This commit is contained in:
anovazzi1 2024-05-29 21:03:54 -03:00
commit 86b6672bbd
3 changed files with 8 additions and 5 deletions

View file

@ -6,13 +6,13 @@ import TableComponent from "../tableComponent";
import { extractColumnsFromRows } from "../../utils/utils";
function RecordsOutputComponent({
flowPool,
flowPoolObject,
pagination,
}: {
flowPool: FlowPoolObjectType;
flowPoolObject: FlowPoolObjectType;
pagination: boolean;
}) {
const rows = flowPool?.data?.artifacts?.records ?? [];
const rows = flowPoolObject?.data?.artifacts?.records ?? [];
const columns = extractColumnsFromRows(rows, "union");
const columnDefs = columns.map((col, idx) => ({
...col,

View file

@ -31,7 +31,10 @@ export default function SwitchOutputView(nodeId): JSX.Element {
</Case>
<Case condition={node && Array.isArray(results)}>
<RecordsOutputComponent flowPool={flowPoolNode} pagination={true} />
<RecordsOutputComponent
flowPoolObject={flowPoolNode}
pagination={true}
/>
</Case>
</>
);

View file

@ -247,7 +247,7 @@ export default function IOFieldView({
return (
<div className={left ? "h-56" : "h-full"}>
<RecordsOutputComponent
flowPool={flowPoolNode}
flowPoolObject={flowPoolNode}
pagination={!left}
/>
</div>