-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use TanStack Table instead of self-implemented DataGrid #846
Conversation
6bec4f1
to
5bb1c08
Compare
6db5048
to
c3e2e3b
Compare
getFilteredRowModel: getFilteredRowModel(), | ||
autoResetPageIndex: false, | ||
// | ||
// debugTable: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[todo] Need to delete.
@porink0424 Could you review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks almost great, but I left some nits!
function FilterMenu<T>(props: { | ||
header: Header<T, unknown> | ||
filterChoices: string[] | ||
}): React.ReactElement { | ||
const { header, filterChoices } = props |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nits]: How about just receiving arguments with destructing assignment?
function FilterMenu<T>({
header,
filterChoices
}: {
header: Header<T, unknown>
filterChoices: string[]
}): React.ReactElement {
function DataGrid<T>(props: { | ||
data: T[] | ||
columns: ColumnDef<T>[] | ||
}): React.ReactElement { | ||
const { data, columns } = props |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nits]: same as above
} | ||
const TablePaginationActions = (props: TablePaginationActionsProps) => { | ||
const theme = useTheme() | ||
const { count, page, rowsPerPage, onPageChange } = props |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nits]: same as above
const columns: ColumnDef<Optuna.Attribute, any>[] = [ | ||
columnHelper.accessor("key", { | ||
header: "Key", | ||
footer: (info) => info.column.id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nits]: Footer is not created in the table, is this prop really necessary or not?
4bd134e
to
9070a8e
Compare
@porink0424 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM👍
Contributor License Agreement
This repository (
optuna-dashboard
) and Goptuna share common code.This pull request may therefore be ported to Goptuna.
Make sure that you understand the consequences concerning licenses and check the box below if you accept the term before creating this pull request.
Reference Issues/PRs
NA
What does this implement/fix? Explain your changes.
Use TanStack Table instead of self-implemented DataGrid