Skip to content

Commit ba2e45c

Browse files
Fix intermittent issue of Dialog not closing sometimes
1 parent f772c5d commit ba2e45c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docs/data/material/components/material-icons/SearchIcons.js

+8-5
Original file line numberDiff line numberDiff line change
@@ -610,11 +610,14 @@ export default function SearchIcons() {
610610
itemContent={Icon(handleOpenClick)}
611611
/>
612612
</Grid>
613-
<DialogDetails
614-
open={!!selectedIcon}
615-
selectedIcon={dialogSelectedIcon}
616-
handleClose={handleClose}
617-
/>
613+
{/* Temporary fix for Dialog not closing sometimes and Backdrop stuck at opacity 0 (see issue https://github.com/mui/material-ui/issues/32286). */}
614+
{selectedIcon ? (
615+
<DialogDetails
616+
open={!!selectedIcon}
617+
selectedIcon={dialogSelectedIcon}
618+
handleClose={handleClose}
619+
/>
620+
) : null}
618621
</Grid>
619622
);
620623
}

0 commit comments

Comments
 (0)