Skip to content

Commit

Permalink
fix: report layout with scrollbars
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaclennan committed Oct 6, 2019
1 parent d69b68b commit cf3e204
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/ReportView/ReportViewContent.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow
import React, { useState } from 'react'
import React, { useState, useMemo } from 'react'
import { makeStyles } from '@material-ui/styles'
import getScrollBarWidth from 'get-scrollbar-width'
import {
AutoSizer,
List,
Expand Down Expand Up @@ -63,6 +64,7 @@ const ReportViewContent = ({
}: Props) => {
const classes = useStyles()
const [mapPosition, setMapPosition] = useState()
const scrollbarWidth = useMemo(() => getScrollBarWidth(), [])

const cacheRef = React.useRef(
new CellMeasurerCache({
Expand Down Expand Up @@ -225,17 +227,17 @@ const useStyles = makeStyles({
},
letter: {
'&$reportWrapper': {
minWidth: 8.5 * inch()
// minWidth: 8.5 * inch()
}
},
a4: {
'&$reportWrapper': {
minWidth: 21 * cm()
// minWidth: 21 * cm()
}
},
scrollWrapper: {
flex: '1 1 auto',
overflow: 'scroll',
overflow: 'hidden',
'@media only print': {
overflow: 'auto',
flex: 'initial',
Expand Down

0 comments on commit cf3e204

Please sign in to comment.