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";
|
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,
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue