From f04500827a4bba885291dfaed078650457c1581e Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Wed, 1 Jun 2022 12:16:31 +0200 Subject: [PATCH] fix: header not sticky sometimes --- packages/widget/src/components/AppContainer.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/widget/src/components/AppContainer.tsx b/packages/widget/src/components/AppContainer.tsx index 2a7d022c8..0963569d9 100644 --- a/packages/widget/src/components/AppContainer.tsx +++ b/packages/widget/src/components/AppContainer.tsx @@ -1,4 +1,4 @@ -import { Box, ScopedCssBaseline } from '@mui/material'; +import { Box, Container, ScopedCssBaseline } from '@mui/material'; import { styled } from '@mui/material/styles'; import { PropsWithChildren, RefObject, useLayoutEffect, useRef } from 'react'; import { useLocation } from 'react-router-dom'; @@ -34,6 +34,14 @@ const ScrollableContainer = styled(Box)({ display: 'flex', }); +const FlexContainer = styled(Container)({ + display: 'flex', + flexBasis: 'auto', + flexDirection: 'column', + flexShrink: 0, + flexGrow: 1, +}); + export const AppContainer: React.FC> = ({ children }) => { const ref = useRef(null); const { containerStyle } = useWidgetConfig(); @@ -41,8 +49,10 @@ export const AppContainer: React.FC> = ({ children }) => { - {children} - + + {children} + +