Skip to content

Commit

Permalink
changed visual behaviour of the datagrid height
Browse files Browse the repository at this point in the history
  • Loading branch information
TharindaPrabhath committed Oct 30, 2021
1 parent d455d06 commit 5cbe9a9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/components/CertificateTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ const CertificateTable = () => {
return (
<div
style={{
height: 400,
height: "100%",
width: "100%",
backgroundColor: colors.secondaryBgClr,
borderRadius: "1em",
Expand All @@ -244,15 +244,16 @@ const CertificateTable = () => {
<DataGrid
rows={certificates || []}
columns={columns}
rowCount={100}
rowsPerPageOptions={[5, 10]}
rowCount={1000}
rowsPerPageOptions={[5, 10, 50, 100]}
paginationMode="server"
pagination
pageSize={pageSize}
onPageChange={(n) => setPageNo(n)}
onPageSizeChange={(s) => setPageSize(s)}
checkboxSelection
disableSelectionOnClick
autoHeight
style={{
color: colors.secondaryFontClr,
borderColor: "transparent",
Expand Down
9 changes: 5 additions & 4 deletions src/components/UserTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ const UserTable = () => {
return (
<div
style={{
height: 400,
height: "100%",
width: "100%",
backgroundColor: colors.secondaryBgClr,
borderRadius: "1em",
Expand All @@ -233,15 +233,16 @@ const UserTable = () => {
<DataGrid
rows={users || []}
columns={columns}
rowCount={100}
rowsPerPageOptions={[5, 10]}
rowCount={10000}
rowsPerPageOptions={[5, 10, 50, 100]}
paginationMode="server"
pagination
pageSize={pageSize}
//pageSize={pageSize}
onPageChange={(n) => setPageNo(n)}
onPageSizeChange={(s) => setPageSize(s)}
checkboxSelection
disableSelectionOnClick
autoHeight
style={{
color: colors.secondaryFontClr,
borderColor: "transparent",
Expand Down

0 comments on commit 5cbe9a9

Please sign in to comment.