From 326dd535a5a073ae4feeac52e66952dac1bd37d7 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Tue, 24 Nov 2020 09:36:36 +0100 Subject: [PATCH] fix: flyoutMenu thinks every item is a flyout and stops propagation (#1326) FlyoutMenu thinks every item is a flyout and stops propagation of the click. The result is that the "View in Visualizer" option wasn't working. This change also fixes the double bottom border issue that FlyoutMenu causes. --- .../Item/VisualizationItem/ItemHeaderButtons.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/components/Item/VisualizationItem/ItemHeaderButtons.js b/src/components/Item/VisualizationItem/ItemHeaderButtons.js index 815b47db3..668e08505 100644 --- a/src/components/Item/VisualizationItem/ItemHeaderButtons.js +++ b/src/components/Item/VisualizationItem/ItemHeaderButtons.js @@ -7,14 +7,7 @@ import { VIS_TYPE_GAUGE, VIS_TYPE_PIE, } from '@dhis2/analytics' -import { - Button, - FlyoutMenu, - Popover, - MenuItem, - Divider, - colors, -} from '@dhis2/ui' +import { Button, Menu, Popover, MenuItem, Divider, colors } from '@dhis2/ui' import i18n from '@dhis2/d2-i18n' import TableIcon from '@material-ui/icons/ViewList' import ChartIcon from '@material-ui/icons/InsertChart' @@ -126,7 +119,7 @@ const ItemHeaderButtons = (props, context) => { arrow={false} onClickOutside={closeMenu} > - + {canViewAs && ( <> @@ -148,7 +141,7 @@ const ItemHeaderButtons = (props, context) => { label={interpretationMenuLabel} onClick={handleInterpretationClick} /> - + )}