diff --git a/packages/geoview-core/src/ui/panel/panel.tsx b/packages/geoview-core/src/ui/panel/panel.tsx index c2a53a9ea17..d9b379f8dcf 100644 --- a/packages/geoview-core/src/ui/panel/panel.tsx +++ b/packages/geoview-core/src/ui/panel/panel.tsx @@ -116,15 +116,12 @@ export function Panel(props: TypePanelAppProps): JSX.Element { * Update the height of the panel when the mapInfo is expanded */ useEffect(() => { - // setTimeout prevents a bug that would cause the panel to flicker. - setTimeout(() => { - const mapInfo = document.getElementById(`${mapId}-mapInfo`); + const mapInfo = document.getElementById(`${mapId}-mapInfo`); - if (panelContainerRef.current && open && mapInfo) { - const mapInfoHeight = mapInfoExpanded ? '6rem' : '3rem'; - panelContainerRef.current.style.height = `calc(100% - ${mapInfoHeight})`; - } - }, 1); + if (panelContainerRef.current && open && mapInfo) { + const mapInfoHeight = mapInfoExpanded ? '6rem' : '3rem'; + panelContainerRef.current.style.height = `calc(100% - ${mapInfoHeight})`; + } }, [mapInfoExpanded, mapSize, open, mapId]); return (