Skip to content
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

[fix] remove auto page calculation from table #324

Merged
merged 8 commits into from
Nov 20, 2024
7 changes: 4 additions & 3 deletions src/pages/panel/inventory/InventoryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export default function InventoryPage() {
</Stack>
</Stack>
<Divider orientation="vertical" />
<Stack height="100%" flex={1} py={3.75} px={3.75} spacing={3}>
<Stack height="100%" flex={1} py={3.75} px={3.75} spacing={3} minWidth={0}>
<Stack direction="row" gap={2} flexWrap="wrap" flex={0}>
<GridFilterItem items={clouds} name={t`clouds`} onChange={setCloudFilter} values={cloudFilter} />
<GridFilterItem items={accounts} name={t`accounts`} onChange={setAccountFilter} values={accountFilter} />
Expand All @@ -284,7 +284,7 @@ export default function InventoryPage() {
/>
</Stack>
</Stack>
<Box height="100%" flex={1}>
<Box flex={1} minHeight={0} height="100%" overflow="auto">
{pendingTransition ? (
<LoadingSuspenseFallback />
) : (
Expand All @@ -298,7 +298,8 @@ export default function InventoryPage() {
columns={columns}
rows={rows}
pagination
autoPageSize
disableAutosize
disableVirtualization
rowHeight={62}
disableAggregation
disableRowGrouping
Expand Down
9 changes: 8 additions & 1 deletion src/pages/panel/inventory/StyledDataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ import { DataGridPremium, gridClasses } from '@mui/x-data-grid-premium'

export const StyledDataGrid = styled(DataGridPremium)(({ theme }) => ({
border: 'none',
'--DataGrid-containerBackground': theme.palette.common.white,
height: '100%',
width: '100%',
flex: 1,
['--DataGrid-rowBorderColor']: theme.palette.divider,
[`.${gridClasses.root}`]: {
height: '100%',
minHeight: 0,
},
[`.${gridClasses.columnHeader}`]: {
backgroundColor: theme.palette.common.white,
color: theme.palette.text.secondary,
...theme.typography.subtitle1,
},
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3186,9 +3186,9 @@ camelcase@^6.2.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==

caniuse-lite@^1.0.30001541:
version "1.0.30001620"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001620.tgz"
integrity sha512-WJvYsOjd1/BYUY6SNGUosK9DUidBPDTnOARHp3fSmFO1ekdxaY6nKRttEVrfMmYi80ctS0kz1wiWmm14fVc3ew==
version "1.0.30001680"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001680.tgz"
integrity sha512-rPQy70G6AGUMnbwS1z6Xg+RkHYPAi18ihs47GH0jcxIG7wArmPgY3XbS2sRdBbxJljp3thdT8BIqv9ccCypiPA==

ccount@^2.0.0:
version "2.0.1"
Expand Down Expand Up @@ -6342,10 +6342,10 @@ path-scurry@^1.11.1:
lru-cache "^10.2.0"
minipass "^5.0.0 || ^6.0.2 || ^7.0.0"

path-to-regexp@6.2.2:
version "6.2.2"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.2.tgz#324377a83e5049cbecadc5554d6a63a9a4866b36"
integrity sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==
path-to-regexp@6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.3.0.tgz#2b6a26a337737a8e1416f9272ed0766b1c0389f4"
integrity sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==

path-type@^4.0.0:
version "4.0.0"
Expand Down
Loading