Fix broken tests

This commit is contained in:
c-bata
2022-12-12 09:58:54 +09:00
parent 5bb9f81eb0
commit d35501686b
+4 -3
View File
@@ -278,11 +278,12 @@ function DataGridRow<T>(props: {
{columns.map((column, columnIndex) => {
const cellItem = column.toCellValue
? column.toCellValue(rowIndex)
: row[column.field]
: // TODO(c-bata): Avoid this implicit type conversion.
(row[column.field] as number | string | null | undefined)
return column.filterable ? (
<TableCell
key={`${row[keyField]}:${column.field}:${columnIndex}`}
key={`${row[keyField]}:${column.field.toString()}:${columnIndex}`}
padding={column.padding || "normal"}
onClick={(e) => {
const value =
@@ -296,7 +297,7 @@ function DataGridRow<T>(props: {
</TableCell>
) : (
<TableCell
key={`${row[keyField]}:${column.field}:${columnIndex}`}
key={`${row[keyField]}:${column.field.toString()}:${columnIndex}`}
padding={column.padding || "normal"}
>
{cellItem}