我实施的材料表的事件记录。 数据的这一事件日志收到的'string'&'布尔'值。 我可以显示的串值,但是,我唯一可以显示所有真正或有错误的。 我不能找出如何获得真正的和虚假的价值,以显示正确。
<TableContainer component={Paper}>
<Table>
<TableHead>
<StyledTableRow>
{data[0] &&
columns.map((heading) => <TableCell>{heading}</TableCell>)}
</StyledTableRow>
</TableHead>
<TableBody>
{data.map((row) => (
<TableRow>
{columns.map((column) => (
<TableCell>
{typeof row[column] === 'boolean' && false
? 'False'
: typeof row[column] === 'boolean' && true
? 'True'
: row[column]}
</TableCell>
))}
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>