diff --git a/optuna_dashboard/ts/components/Artifact/ArtifactCardMedia.tsx b/optuna_dashboard/ts/components/Artifact/ArtifactCardMedia.tsx
index 61935dba..7ea83290 100644
--- a/optuna_dashboard/ts/components/Artifact/ArtifactCardMedia.tsx
+++ b/optuna_dashboard/ts/components/Artifact/ArtifactCardMedia.tsx
@@ -2,7 +2,6 @@ import InsertDriveFileIcon from "@mui/icons-material/InsertDriveFile"
import { Box, CardMedia } from "@mui/material"
import React, { FC } from "react"
import { Artifact } from "ts/types/optuna"
-import { TableArtifactViewer, isTableArtifact } from "./TableArtifactViewer"
import {
ThreejsArtifactViewer,
isThreejsArtifact,
@@ -14,14 +13,7 @@ export const ArtifactCardMedia: FC<{
urlPath: string
height: string
}> = ({ artifact, urlPath, height }) => {
- if (isTableArtifact(artifact)) {
- return (
-
- )
- } else if (isThreejsArtifact(artifact)) {
+ if (isThreejsArtifact(artifact)) {
return (
= (
}))
}, [data])
- return
+ return
}
export const useTableArtifactModal = (): [
@@ -77,6 +77,10 @@ export const useTableArtifactModal = (): [
transform: "translate(-50%, -50%)",
bgcolor: "background.paper",
borderRadius: "15px",
+ width: "80%",
+ maxHeight: "80%",
+ overflowY: "auto",
+ p: 2,
}}
>
({
function DataGrid({
data,
columns,
+ initialRowsPerPage,
}: {
data: T[]
columns: ColumnDef[]
+ initialRowsPerPage?: number
}): React.ReactElement {
const [sorting, setSorting] = React.useState([])
const [columnFilters, setColumnFilters] = React.useState(
[]
)
+ const rowsPerPageOptions = [10, 50, 100, { label: "All", value: data.length }]
+
const [pagination, setPagination] = React.useState({
pageIndex: 0,
- pageSize: 50,
+ pageSize:
+ initialRowsPerPage && rowsPerPageOptions.includes(initialRowsPerPage)
+ ? initialRowsPerPage
+ : 50,
})
const table = useReactTable({
@@ -236,12 +243,7 @@ function DataGrid({