diff --git a/src/pods/thumb-pages/components/thumb-page.tsx b/src/pods/thumb-pages/components/thumb-page.tsx index 6dd7f8ac..eb853117 100644 --- a/src/pods/thumb-pages/components/thumb-page.tsx +++ b/src/pods/thumb-pages/components/thumb-page.tsx @@ -31,6 +31,7 @@ export const ThumbPage: React.FunctionComponent = props => { }); const divRef = useRef(null); + const [key, setKey] = React.useState(0); React.useEffect(() => { const newCanvaSize = { @@ -48,6 +49,8 @@ export const ThumbPage: React.FunctionComponent = props => { setCanvasSize(newCanvaSize); setFinalScale(calculateScaleBasedOnBounds(shapes, newCanvaSize)); + setKey(key => key + 1); + return () => { window.removeEventListener('resize', () => { setCanvasSize({ @@ -72,6 +75,7 @@ export const ThumbPage: React.FunctionComponent = props => { className={classes.container} onClick={() => onSetActivePage(page.id)} onContextMenu={handleShowContextMenu} + key={key} >