Skip to content

Commit

Permalink
Bux fix- infinite loading loop of panels
Browse files Browse the repository at this point in the history
Signed-off-by: Kavitha Conjeevaram Mohan <mohakavi@amazon.com>
  • Loading branch information
kavithacm committed Aug 10, 2023
1 parent 59bfd3f commit ef790a7
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export const VisualizationContainer = ({
const [modalContent, setModalContent] = useState(<></>);

const queryMetaData = useSelector(metricQuerySelector(visualizationId));
console.log('queryMetaData: ', queryMetaData);
const closeModal = () => setIsModalVisible(false);

function flattenPanelTree(tree, array = []) {
Expand All @@ -133,6 +134,10 @@ export const VisualizationContainer = ({
return array;
}

useEffect(() => {
console.log('contextMenuId: ', contextMenuId);
}, []);

const showErrorModal = () => {
setModalContent(
<EuiModal onClose={closeModal}>
Expand Down Expand Up @@ -345,11 +350,14 @@ export const VisualizationContainer = ({

useEffect(() => {
loadVisaulization();
}, [onRefresh, queryMetaData]);
}, [onRefresh]);

useEffect(() => {
if (catalogVisualization) loadVisaulization();
}, [queryMetaData]);

const metricVisCss = catalogVisualization ? 'metricVis' : '';

console.log('VisualizatinContainer render');
return (
<>
<EuiPanel
Expand Down

0 comments on commit ef790a7

Please sign in to comment.