import React, { useContext } from "react" import LoadingInline from "../../pb_loading_inline/_loading_inline" import { flexRender, Row } from "@tanstack/react-table" import { SubRowHeaderRow } from "../Components/SubRowHeaderRow" import { LoadingCell } from "../Components/LoadingCell" import { renderCollapsibleTrail } from "../Components/CollapsibleTrail" import AdvancedTableContext from "../Context/AdvancedTableContext" import { isChrome } from "../Utilities/BrowserCheck" import { DataType } from "../Utilities/types" type TableBodyProps = { collapsibleTrail?: boolean subRowHeaders?: string[] } export const TableBody = ({ collapsibleTrail = true, subRowHeaders, }: TableBodyProps) => { const { enableToggleExpansion, handleExpandOrCollapse, loading, table, } = useContext(AdvancedTableContext) return ( <>
{table.getRowModel().rows.map((row: Row