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"; import { extractColumnsFromRows } from "../../utils/utils";
function RecordsOutputComponent({ function RecordsOutputComponent({
flowPool, flowPoolObject,
pagination, pagination,
}: { }: {
flowPool: FlowPoolObjectType; flowPoolObject: FlowPoolObjectType;
pagination: boolean; pagination: boolean;
}) { }) {
const rows = flowPool?.data?.artifacts?.records ?? []; const rows = flowPoolObject?.data?.artifacts?.records ?? [];
const columns = extractColumnsFromRows(rows, "union"); const columns = extractColumnsFromRows(rows, "union");
const columnDefs = columns.map((col, idx) => ({ const columnDefs = columns.map((col, idx) => ({
...col, ...col,

View file

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

View file

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