Skip to content

Commit

Permalink
fix: adjust z-index so tooltip shows (#2059)
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Henrik Øverland <jan@dhis2.org>
  • Loading branch information
jenniferarnesen and janhenrikoverland authored Jan 10, 2022
1 parent 3cfb0eb commit a0add62
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
7 changes: 6 additions & 1 deletion src/components/ControlBar/ViewControlBar/ShowMoreButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ const ShowMoreButton = ({ onClick, dashboardBarIsExpanded, disabled }) => {
<ChevronDown />
</div>
) : (
<Tooltip content={buttonLabel} placement="bottom">
<Tooltip
content={buttonLabel}
placement="top"
openDelay={500}
closeDelay={0}
>
{({ onMouseOver, onMouseOut, ref }) => (
<button
className={classes.showMore}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

.expanded .container {
height: var(--max-rows-height);
z-index: 2001;
z-index: 1999;
}

.spacer {
Expand Down
4 changes: 1 addition & 3 deletions src/components/Dashboard/ViewDashboard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useState, useEffect } from 'react'
import { connect } from 'react-redux'
import PropTypes from 'prop-types'
import { ComponentCover } from '@dhis2/ui'
import cx from 'classnames'
import DashboardContainer from './DashboardContainer'
import ViewTitleBar from '../TitleBar/ViewTitleBar'
Expand Down Expand Up @@ -62,9 +61,8 @@ export const ViewDashboard = props => {
/>
<DashboardContainer covered={controlbarExpanded}>
{controlbarExpanded && (
<ComponentCover
<div
className={classes.cover}
translucent
onClick={() => setControlbarExpanded(false)}
/>
)}
Expand Down
7 changes: 7 additions & 0 deletions src/components/Dashboard/styles/ViewDashboard.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
}

.cover {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1998;
background: rgba(33, 43, 54, 0.4);
display: none;
}

Expand Down

0 comments on commit a0add62

Please sign in to comment.