Skip to content

Commit

Permalink
fix: fix possible material-ui warning caused by disabled Button in To…
Browse files Browse the repository at this point in the history
…oltip
  • Loading branch information
csm-thu committed Aug 9, 2022
1 parent 52a63ab commit ec73c3a
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,12 @@ export const SimplePowerBIReportEmbed = ({
{refreshable && (
<div className={classes.toolbar}>
<Tooltip title={labels.refreshTooltip}>
<IconButton aria-label="refresh" disabled={!report || disabled} color="primary" onClick={refreshReport}>
<RefreshIcon />
</IconButton>
{/* span is required to prevent MUI warning when the child Button in Tooltip is disabled */}
<span>
<IconButton aria-label="refresh" disabled={!report || disabled} color="primary" onClick={refreshReport}>
<RefreshIcon />
</IconButton>
</span>
</Tooltip>
</div>
)}
Expand Down

0 comments on commit ec73c3a

Please sign in to comment.