Disabled backdrop click for offers modals (#19194)

refs ADM-37

- backdrop click should be disabled for modals, especially when modals
contain user editable fields
- to make things consistent, all offers related modals are not closeable
by backdrop clicking
This commit is contained in:
Sodbileg Gansukh 2023-11-30 16:56:29 +08:00 committed by GitHub
parent cdfe3843c3
commit 79081686b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 0 deletions

View File

@ -44,6 +44,7 @@ export interface PreviewModalProps {
sidebarPadding?: boolean;
sidebarContentClasses?: string;
enableCMDS?: boolean;
backDropClick?: boolean;
onCancel?: () => void;
onOk?: () => void;
@ -83,6 +84,7 @@ export const PreviewModalContent: React.FC<PreviewModalProps> = ({
sidebarPadding = true,
sidebarContentClasses,
enableCMDS = true,
backDropClick,
onCancel,
onOk,
@ -262,6 +264,7 @@ export const PreviewModalContent: React.FC<PreviewModalProps> = ({
<Modal
afterClose={afterClose}
animate={false}
backDropClick={backDropClick}
footer={false}
height={height}
padding={false}

View File

@ -614,6 +614,7 @@ const AddOfferModal = () => {
afterClose={() => {
updateRoute('offers');
}}
backDropClick={false}
cancelLabel='Cancel'
deviceSelector={false}
dirty={saveState === 'unsaved'}

View File

@ -256,6 +256,7 @@ const EditOfferModal: React.FC<{id: string}> = ({id}) => {
afterClose={() => {
updateRoute('offers');
}}
backDropClick={false}
deviceSelector={false}
dirty={saveState === 'unsaved'}
height='full'

View File

@ -74,6 +74,7 @@ const OfferSuccess: React.FC<{id: string}> = ({id}) => {
updateRoute('offers');
}}
animate={false}
backDropClick={false}
footer={false}
height='full'
size='lg'

View File

@ -194,6 +194,7 @@ export const OffersIndexModal = () => {
updateRoute('offers');
}}
animate={false}
backDropClick={false}
cancelLabel=''
header={false}
height='full'