mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
Add getContainer to Modal.info etc, close #11377
This commit is contained in:
parent
be78706364
commit
877f9fd7d6
@ -79,6 +79,7 @@ export interface ModalFuncProps {
|
||||
style?: React.CSSProperties;
|
||||
type?: string;
|
||||
keyboard?: boolean;
|
||||
getContainer?: (instance: React.ReactInstance) => HTMLElement;
|
||||
}
|
||||
|
||||
export type ModalFunc = (props: ModalFuncProps) => {
|
||||
|
@ -14,7 +14,7 @@ interface ConfirmDialogProps extends ModalFuncProps {
|
||||
const IS_REACT_16 = !!ReactDOM.createPortal;
|
||||
|
||||
const ConfirmDialog = (props: ConfirmDialogProps) => {
|
||||
const { onCancel, onOk, close, zIndex, afterClose, visible, keyboard } = props;
|
||||
const { onCancel, onOk, close, zIndex, afterClose, visible, keyboard, getContainer } = props;
|
||||
const iconType = props.iconType || 'question-circle';
|
||||
const okType = props.okType || 'primary';
|
||||
const prefixCls = props.prefixCls || 'ant-confirm';
|
||||
@ -57,6 +57,7 @@ const ConfirmDialog = (props: ConfirmDialogProps) => {
|
||||
zIndex={zIndex}
|
||||
afterClose={afterClose}
|
||||
keyboard={keyboard}
|
||||
getContainer={getContainer}
|
||||
>
|
||||
<div className={`${prefixCls}-body-wrapper`}>
|
||||
<div className={`${prefixCls}-body`}>
|
||||
|
Loading…
Reference in New Issue
Block a user