refactor name props
This commit is contained in:
parent
0ae9d8db6a
commit
86b6672bbd
3 changed files with 8 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ export default function IOFieldView({
|
|||
return (
|
||||
<div className={left ? "h-56" : "h-full"}>
|
||||
<RecordsOutputComponent
|
||||
flowPool={flowPoolNode}
|
||||
flowPoolObject={flowPoolNode}
|
||||
pagination={!left}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue