From 167c15238ac65f9065ffcab3bf12d949c8df1c7f Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Thu, 21 Dec 2023 17:36:42 -0500 Subject: [PATCH] fix: prevent UI from jumping around when selecting workspaces (#11321) --- site/src/components/PaginationWidget/PaginationHeader.tsx | 6 ++++++ site/src/pages/WorkspacesPage/WorkspacesPageView.tsx | 1 + 2 files changed, 7 insertions(+) diff --git a/site/src/components/PaginationWidget/PaginationHeader.tsx b/site/src/components/PaginationWidget/PaginationHeader.tsx index 043ea67481..cc6c4fafd9 100644 --- a/site/src/components/PaginationWidget/PaginationHeader.tsx +++ b/site/src/components/PaginationWidget/PaginationHeader.tsx @@ -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 = ({ @@ -14,6 +18,7 @@ export const PaginationHeader: FC = ({ limit, totalRecords, currentOffsetStart, + className, }) => { const theme = useTheme(); @@ -32,6 +37,7 @@ export const PaginationHeader: FC = ({ color: theme.palette.text.primary, }, }} + className={className} > {totalRecords !== undefined ? ( <> diff --git a/site/src/pages/WorkspacesPage/WorkspacesPageView.tsx b/site/src/pages/WorkspacesPage/WorkspacesPageView.tsx index 435f4f4c26..4fc999965b 100644 --- a/site/src/pages/WorkspacesPage/WorkspacesPageView.tsx +++ b/site/src/pages/WorkspacesPage/WorkspacesPageView.tsx @@ -162,6 +162,7 @@ export const WorkspacesPageView = ({ limit={limit} totalRecords={count} currentOffsetStart={(page - 1) * limit + 1} + css={{ paddingBottom: "0" }} /> )}