From 8b4a5e5cc1b0924f137eb19ce8071d782410a796 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 4 Nov 2024 02:54:42 +0530 Subject: [PATCH 1/4] fix info panel bug --- src/components/BrowserCell/BrowserCell.react.js | 4 ++-- src/components/Toolbar/Toolbar.react.js | 8 ++++---- src/dashboard/Data/Browser/Browser.react.js | 13 +++++++------ src/dashboard/Data/Browser/BrowserToolbar.react.js | 4 +++- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/components/BrowserCell/BrowserCell.react.js b/src/components/BrowserCell/BrowserCell.react.js index 74614feb69..b794f13f61 100644 --- a/src/components/BrowserCell/BrowserCell.react.js +++ b/src/components/BrowserCell/BrowserCell.react.js @@ -294,7 +294,7 @@ export default class BrowserCell extends Component { this.props.setShowAggregatedData(true); this.props.setSelectedObjectId(this.props.objectId); if (this.props.isPanelVisible) { - this.props.callCloudFunction(this.props.objectId, this.props.className); + this.props.callCloudFunction(this.props.objectId, this.props.className, this.props.appId); } } @@ -649,7 +649,7 @@ export default class BrowserCell extends Component { isPanelVisible && ((e.shiftKey && !this.props.firstSelectedCell) || !e.shiftKey) ) { - callCloudFunction(this.props.objectId, this.props.className); + callCloudFunction(this.props.objectId, this.props.className, this.props.appId); } } handleCellClick(e, row, col); diff --git a/src/components/Toolbar/Toolbar.react.js b/src/components/Toolbar/Toolbar.react.js index aad773e702..f40af541eb 100644 --- a/src/components/Toolbar/Toolbar.react.js +++ b/src/components/Toolbar/Toolbar.react.js @@ -15,7 +15,7 @@ import { useNavigate, useNavigationType, NavigationType } from 'react-router-dom const POPOVER_CONTENT_ID = 'toolbarStatsPopover'; -const Stats = ({ data, classwiseCloudFunctions, className }) => { +const Stats = ({ data, classwiseCloudFunctions, className, appId }) => { const [selected, setSelected] = React.useState(null); const [open, setOpen] = React.useState(false); const buttonRef = React.useRef(); @@ -98,7 +98,7 @@ const Stats = ({ data, classwiseCloudFunctions, className }) => { setSelected(statsOptions[0]); }, []); - const rightMarginStyle = classwiseCloudFunctions && classwiseCloudFunctions[className] ? '120px' : 'initial'; + const rightMarginStyle = classwiseCloudFunctions && classwiseCloudFunctions[appId] && classwiseCloudFunctions[appId][className] ? '120px' : 'initial'; return ( <> @@ -140,9 +140,9 @@ const Toolbar = props => { - {props?.selectedData?.length ? : null} + {props?.selectedData?.length ? : null}
{props.children}
- {props.classwiseCloudFunctions && props.classwiseCloudFunctions[props.className] && ( + {props.classwiseCloudFunctions && props.classwiseCloudFunctions[props.appId] && props.classwiseCloudFunctions[props.appId][props.className] && (