Skip to content

Commit e3da21c

Browse files
committed
Fix layout scrolling for management pages
1 parent 5bb264b commit e3da21c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

frontend/src/components/layout/Layout.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ export const Layout: React.FC<LayoutProps> = ({
1414
const bgColor = useColorModeValue('white', 'gray.800')
1515

1616
return (
17-
<Flex minH="100vh" w="100vw">
17+
<Flex h="100vh" w="100vw" overflow="hidden">
1818
<Sidebar />
1919

20-
{/* Main content */}
21-
<Box flex={1} bg={bgColor} p={isFullScreen ? 0 : 6} overflow="hidden">
20+
{/* Main content needs its own scroll container so the sidebar stays fixed */}
21+
<Box
22+
flex={1}
23+
h="100%"
24+
bg={bgColor}
25+
p={isFullScreen ? 0 : 6}
26+
overflowY="auto"
27+
>
2228
{children}
2329
</Box>
2430
</Flex>

frontend/src/components/layout/Sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const Sidebar: React.FC = () => {
3030
]
3131

3232
return (
33-
<Box w="250px" flexShrink={0} p={6} shadow="lg" bg="blue.900">
33+
<Box w="250px" flexShrink={0} p={6} shadow="lg" bg="blue.900" h="100vh">
3434
<Flex direction="column" h="100%">
3535
<Heading size="lg" color="white" mb={8}>
3636
Dashmap

0 commit comments

Comments
 (0)