From 03ce0cbee88e525ad132b2b3cc35b0a12734d89b Mon Sep 17 00:00:00 2001 From: c-bata Date: Sun, 28 Feb 2021 12:11:55 +0900 Subject: [PATCH] Fix break line of a table head around clear filter button --- .../static/components/DataGrid.tsx | 73 ++++++++++--------- 1 file changed, 39 insertions(+), 34 deletions(-) diff --git a/optuna_dashboard/static/components/DataGrid.tsx b/optuna_dashboard/static/components/DataGrid.tsx index 18b32890..951a26ae 100644 --- a/optuna_dashboard/static/components/DataGrid.tsx +++ b/optuna_dashboard/static/components/DataGrid.tsx @@ -41,6 +41,9 @@ const useStyles = makeStyles((theme: Theme) => textDecoration: "underline", cursor: "pointer", }, + tableHeaderCell: { + display: "inline-flex", + }, }) ) @@ -157,40 +160,42 @@ function DataGrid(props: { padding={column.padding || "default"} sortDirection={orderBy === column.field ? order : false} > - {column.sortable ? ( - - {column.label} - {orderBy === column.field ? ( - - {order === "desc" - ? "sorted descending" - : "sorted ascending"} - - ) : null} - - ) : ( - column.label - )} - {column.filterable ? ( - { - clearFilter(column.field) - }} - > - - - ) : null} + + {column.sortable ? ( + + {column.label} + {orderBy === column.field ? ( + + {order === "desc" + ? "sorted descending" + : "sorted ascending"} + + ) : null} + + ) : ( + column.label + )} + {column.filterable ? ( + { + clearFilter(column.field) + }} + > + + + ) : null} + ))}