This commit is contained in:
Thomas Nordquist
2019-06-17 12:12:22 +02:00
parent 90e5336c5c
commit fcb61b563c
6 changed files with 174 additions and 123 deletions

View File

@@ -19,8 +19,8 @@ interface Props {
function ContentView(props: Props) {
const [height, setHeight] = React.useState<string | number>('100%')
const [detectedHeight, setDetectedHeight] = React.useState(0)
const detectSize = React.useCallback((width, height) => {
setDetectedHeight(height)
const detectSize = React.useCallback((width, newHeight) => {
setDetectedHeight(newHeight)
}, [])
// Open chart panel on start and when a new chart is added but the panel is closed