Skip to content

Commit

Permalink
fix: flyoutMenu thinks every item is a flyout and stops propagation (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
jenniferarnesen authored Nov 24, 2020
1 parent 31c2f23 commit 326dd53
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/components/Item/VisualizationItem/ItemHeaderButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -126,7 +119,7 @@ const ItemHeaderButtons = (props, context) => {
arrow={false}
onClickOutside={closeMenu}
>
<FlyoutMenu>
<Menu>
{canViewAs && (
<>
<ViewAsMenuItems />
Expand All @@ -148,7 +141,7 @@ const ItemHeaderButtons = (props, context) => {
label={interpretationMenuLabel}
onClick={handleInterpretationClick}
/>
</FlyoutMenu>
</Menu>
</Popover>
)}
</>
Expand Down

0 comments on commit 326dd53

Please sign in to comment.