File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
frontend/src/components/layout Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff 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 >
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments