From 9727fd0fc80c99ac0a6be4c41ba549857e4415eb Mon Sep 17 00:00:00 2001 From: c-bata Date: Wed, 27 Apr 2022 08:55:53 +0900 Subject: [PATCH] Fix lint errors --- optuna_dashboard/ts/components/DataGrid.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/optuna_dashboard/ts/components/DataGrid.tsx b/optuna_dashboard/ts/components/DataGrid.tsx index 2b634cb7..d43b9777 100644 --- a/optuna_dashboard/ts/components/DataGrid.tsx +++ b/optuna_dashboard/ts/components/DataGrid.tsx @@ -102,12 +102,14 @@ function DataGrid(props: { : filters.some((f) => { // columns.find((c, idx) => idx === f.columnIdx).toCellValue // ここでrowIndexが必要。色々厳しい if (columns.length <= f.columnIdx) { - console.log(`columnIdx=${f.columnIdx} must be smaller than columns.length=${columns.length}`) + console.log( + `columnIdx=${f.columnIdx} must be smaller than columns.length=${columns.length}` + ) return true } const toCellValue = columns[f.columnIdx].toCellValue if (toCellValue !== undefined) { - return toCellValue(rowIdx) ===f.value + return toCellValue(rowIdx) === f.value } const field = columns[f.columnIdx].field return row[field] === f.value @@ -284,7 +286,10 @@ function DataGridRow(props: { key={`${row[keyField]}:${column.field}:${columnIndex}`} padding={column.padding || "normal"} onClick={(e) => { - const value = column.toCellValue !== undefined ? column.toCellValue(rowIndex) : row[column.field] + const value = + column.toCellValue !== undefined + ? column.toCellValue(rowIndex) + : row[column.field] handleClickFilterCell(columnIndex, value) }} >