mirror of
https://github.com/coder/coder.git
synced 2025-07-29 10:35:52 +00:00
fix: prevent UI from jumping around when selecting workspaces (#11321)
This commit is contained in:
@@ -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 ? (
|
||||
<>
|
||||
|
@@ -162,6 +162,7 @@ export const WorkspacesPageView = ({
|
||||
limit={limit}
|
||||
totalRecords={count}
|
||||
currentOffsetStart={(page - 1) * limit + 1}
|
||||
css={{ paddingBottom: "0" }}
|
||||
/>
|
||||
)}
|
||||
</TableToolbar>
|
||||
|
Reference in New Issue
Block a user