From b7b4c65478507ee45fd1865f5877ecbc4fbcdd45 Mon Sep 17 00:00:00 2001 From: rahuldsce Date: Thu, 26 Mar 2020 17:52:25 +0530 Subject: [PATCH] Detail viewer height (#187) Detail Viewer Height Adjustment --- src/constant.js | 4 ++-- src/hoc/dataViewer/DetailViewer.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/constant.js b/src/constant.js index 2f0efb8a08..9b9222ee01 100644 --- a/src/constant.js +++ b/src/constant.js @@ -18,8 +18,8 @@ export const APP_INST = 'AppInst' export const APP = 'App' export const YES = 'YES' -export const getHeight = () => { - return window.innerHeight - 85 +export const getHeight = (height) => { + return window.innerHeight - (height ? height : 85) } export const IPAccessLabel = (id) => { diff --git a/src/hoc/dataViewer/DetailViewer.js b/src/hoc/dataViewer/DetailViewer.js index 3ce65f646f..4d2b1a61cb 100644 --- a/src/hoc/dataViewer/DetailViewer.js +++ b/src/hoc/dataViewer/DetailViewer.js @@ -2,6 +2,7 @@ import React from 'react'; import { Table } from 'semantic-ui-react' import ReactJson from 'react-json-view'; import { Card } from '@material-ui/core'; +import * as constant from '../../constant' const jsonViewProps = { name: null, @@ -62,7 +63,7 @@ const getRow = (id, item, data) => { const MexDetailViewer = (props) => { let detailData = props.detailData; return ( - +