import React from 'react' export default function DataTable({ table, maxHeight = 320 }) { if (!table || !table.columns || !table.rows) { return
Sem dados.
} return (
{table.columns.map((col) => ( ))} {table.rows.map((row, i) => ( {table.columns.map((col) => ( ))} ))}
{col}
{String(row[col] ?? '')}
{table.truncated ? (
Mostrando {table.returned_rows} de {table.total_rows} linhas.
) : null}
) }