Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable backdrop in dialogs and modals #68

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/CCPDashboard/PatientInfoTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ export const PatientInfoTable = ({
open={openDetails}
onClose={handleCloseDetails}
PaperProps={{ className: classes.detailsDialog }}
disableBackdropClick
>
<PatientDetailsDialog
patient={(selectedPatient as unknown) as Patient}
Expand Down
2 changes: 1 addition & 1 deletion src/components/EventCreation/CancelModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const CancelModal: React.FC<{
}> = ({ open, handleClose }: { open: boolean; handleClose: () => void }) => {
const classes = useModalStyles();
return (
<Modal open={open} onClose={handleClose}>
<Modal open={open} onClose={handleClose} disableBackdropClick>
<Container classes={{ root: classes.root }}>
<Typography classes={{ root: classes.text }}>
Are you sure you want to cancel this event?
Expand Down
2 changes: 1 addition & 1 deletion src/components/EventCreation/SelectDateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const SelectDateModal: React.FC<{
eventDate ? new Date(eventDate) : null
);
return (
<Modal open={open} onClose={handleClose}>
<Modal open={open} onClose={handleClose} disableBackdropClick>
<Container classes={{ root: classes.root }}>
<Typography variant="h6" classes={{ root: classes.text }}>
Select Event Date:
Expand Down
1 change: 1 addition & 0 deletions src/components/EventDashboard/ActionConfirmationDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const ActionConfirmationDialog = (
onClose={handleClose}
aria-labelledby="alert-dialog-title"
aria-describedby="alert-dialog-description"
disableBackdropClick
>
<DialogTitle id="alert-dialog-title">
{`${includeOrExclude === 'include' ? 'Include' : 'Exclude'} ${
Expand Down
1 change: 1 addition & 0 deletions src/components/Maps/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const Sidebar = ({
onClose={onClose}
PaperProps={{ style: { width: '400px' } }}
disableScrollLock
disableBackdropClick
>
<Typography variant="h4" classes={{ root: styles.title }}>
{title}
Expand Down
2 changes: 1 addition & 1 deletion src/components/PatientProfile/PatientTransportPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const PatientTransportPage = ({
const classes = useStyles();

return (
<Dialog fullScreen open={open} onClose={handleClose}>
<Dialog fullScreen open={open} onClose={handleClose} disableBackdropClick>
<AppBar position="relative" className={classes.appBar}>
<Toolbar variant="dense">
<Typography variant="h6" className={classes.appBarText}>
Expand Down
7 changes: 5 additions & 2 deletions src/components/common/ConfirmModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ const ConfirmModal = ({
const dialogStyle = dialogStyles();

return (
<Dialog classes={{ paper: dialogStyle.paper }} open={open}>
<Dialog
classes={{ paper: dialogStyle.paper }}
open={open}
disableBackdropClick
>
<DialogTitle classes={{ root: dialogStyle.dialogTitle }}>
{title}
</DialogTitle>
Expand All @@ -96,7 +100,6 @@ const ConfirmModal = ({
onClick={(event) => {
event.stopPropagation();
handleClickAction();
handleClickCancel();
}}
>
<Typography variant="body1">{actionLabel}</Typography>
Expand Down