Skip to content

Commit

Permalink
fix: add pagination in DataGrid
Browse files Browse the repository at this point in the history
  • Loading branch information
Yazawazi committed Jul 28, 2024
1 parent d643dbd commit d2b83af
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ const ObjectFieldExtendedTemplate = (props: ObjectFieldProps) => {
Column Preview
</Typography>
<DataGrid
pagination
autoPageSize
columns={[{ field: elementProps.name, minWidth: 350 }]}
rows={candidateRows}
sx={{ minHeight: 400 }}
Expand Down Expand Up @@ -956,6 +958,8 @@ const ObjectFieldExtendedTemplate = (props: ObjectFieldProps) => {
</Stack>
<Box sx={{ height: 400, mt: 1, paddingRight: 1 }}>
<DataGrid
pagination
autoPageSize
columns={columns}
columnVisibilityModel={{
id: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export default function OutputDataframe(props: {
return (
<Box sx={{ height: 400, width: "100%" }}>
<DataGrid
pagination
autoPageSize
rows={newDataframe}
columns={columns}
components={{
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/components/FunixFunction/OutputPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ const OutputPanel = (props: {
else if (props.selectedResponseViewType === "sheet")
return (
<DataGrid
pagination
autoPageSize
columns={[
{ field: "id", headerName: "ID" },
{ field: "value", headerName: "Root" },
Expand Down Expand Up @@ -174,6 +176,8 @@ const OutputPanel = (props: {
}
const grid = (
<DataGrid
pagination
autoPageSize
columns={keysOfArraysInSheet.map((key) => ({
field: key,
}))}
Expand Down

0 comments on commit d2b83af

Please sign in to comment.