import { flexRender, Table as Instance } from "@tanstack/react-table" import Table from "../../../../components/molecules/table" import { ReceiveReturnObject } from "./items-to-receive-form" type Props = { instance: Instance } export const ItemsToReceiveTable = ({ instance }: Props) => { const { getRowModel, getHeaderGroups } = instance return ( {getHeaderGroups().map((headerGroup) => { return ( {headerGroup.headers.map((header) => { return ( {flexRender( header.column.columnDef.header, header.getContext() )} ) })} ) })} {getRowModel().rows.map((row) => { return ( {row.getVisibleCells().map((cell) => { return ( {flexRender(cell.column.columnDef.cell, cell.getContext())} ) })} ) })}
) }