CEC-4206-ecu-page-cut-off (#321)

* CEC-4206-ecu-page-cut-off

* fix test

* Update snapshots

* Fix tooltip title warning

---------

Co-authored-by: jwu-fisker <jwu@fiskerinc.com>
Co-authored-by: John Wu <76966357+jwu-fisker@users.noreply.github.com>
This commit is contained in:
das31
2023-04-25 17:25:22 -04:00
committed by GitHub
parent bd1f6f632c
commit 7b061c0282
3 changed files with 145 additions and 43 deletions

View File

@@ -4,7 +4,8 @@ import {
TableCell,
TableFooter,
TablePagination,
TableRow
TableRow,
Tooltip
} from "@material-ui/core";
import clsx from "clsx";
import React, { useEffect, useState } from "react";
@@ -136,7 +137,13 @@ const CarECUsTable = ({ vin, token, classes }) => {
{tableColumns.map((column, j) => {
const key = `${row.ecu + i}${column.id}`
if (column.id === "updated_at") return (<TableCell key={key} align="center">{LocalDateTimeString(row.updated)}</TableCell>);
return (<TableCell key={key} align="center">{row[column.id]}</TableCell>);
return (
<TableCell key={key} align="center" className={classes.limitWidthTableCell}>
<Tooltip title={`${row[column.id] || 'none'}`}>
<span>{row[column.id]}</span>
</Tooltip>
</TableCell>
);
})}
</TableRow>
))}