fix: Close OOO Create Modal on backdrop click (#17000)

This commit is contained in:
Benny Joo
2024-10-08 17:42:28 +00:00
committed by GitHub
parent e99f6048d6
commit f5dbdae4a9
@@ -86,7 +86,6 @@ export const CreateOrEditOutOfOfficeEntryModal = ({
reasonId: 1,
},
});
console.log(isSubmitting);
const createOrEditOutOfOfficeEntry = trpc.viewer.outOfOfficeCreateOrUpdate.useMutation({
onSuccess: () => {
@@ -105,7 +104,13 @@ export const CreateOrEditOutOfOfficeEntryModal = ({
});
return (
<Dialog open={openModal}>
<Dialog
open={openModal}
onOpenChange={(open) => {
if (!open) {
closeModal();
}
}}>
<DialogContent
onOpenAutoFocus={(event) => {
event.preventDefault();