diff --git a/packages/design/src/components/dialog/Dialog.tsx b/packages/design/src/components/dialog/Dialog.tsx index 2e1e4fb0f3f..ce6c6443275 100644 --- a/packages/design/src/components/dialog/Dialog.tsx +++ b/packages/design/src/components/dialog/Dialog.tsx @@ -59,6 +59,12 @@ export interface IDialogProps { */ closeIcon?: React.ReactNode; + /** + * Whether the dialog should be destroyed on close. + * @default false + */ + destroyOnClose?: boolean; + /** * The footer of the dialog. */ @@ -79,6 +85,7 @@ export function Dialog(props: IDialogProps) { width, draggable = false, closeIcon = , + destroyOnClose = false, footer, onClose, } = props; @@ -124,10 +131,11 @@ export function Dialog(props: IDialogProps) { title={TitleIfDraggable} modalRender={modalRender} closeIcon={closeIcon} + destroyOnClose={destroyOnClose} footer={footer} - onClose={onClose} mask={!draggable} style={style} + onClose={onClose} > {children}