fix: prevent UI from jumping around when selecting workspaces (#11321)

This commit is contained in:
Michael Smith
2023-12-21 17:36:42 -05:00
committed by GitHub
parent b3e3521274
commit 167c15238a
2 changed files with 7 additions and 0 deletions

View File

@@ -7,6 +7,10 @@ type PaginationHeaderProps = {
limit: number;
totalRecords: number | undefined;
currentOffsetStart: number | undefined;
// Temporary escape hatch until Workspaces can be switched over to using
// PaginationContainer
className?: string;
};
export const PaginationHeader: FC<PaginationHeaderProps> = ({
@@ -14,6 +18,7 @@ export const PaginationHeader: FC<PaginationHeaderProps> = ({
limit,
totalRecords,
currentOffsetStart,
className,
}) => {
const theme = useTheme();
@@ -32,6 +37,7 @@ export const PaginationHeader: FC<PaginationHeaderProps> = ({
color: theme.palette.text.primary,
},
}}
className={className}
>
{totalRecords !== undefined ? (
<>

View File

@@ -162,6 +162,7 @@ export const WorkspacesPageView = ({
limit={limit}
totalRecords={count}
currentOffsetStart={(page - 1) * limit + 1}
css={{ paddingBottom: "0" }}
/>
)}
</TableToolbar>