mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
fix modal not support configProvider (#17132)
This commit is contained in:
parent
dc1572cff1
commit
b4025176d1
@ -190,13 +190,17 @@ export default class Modal extends React.Component<ModalProps, {}> {
|
||||
);
|
||||
};
|
||||
|
||||
renderModal = ({ getPrefixCls }: ConfigConsumerProps) => {
|
||||
renderModal = ({
|
||||
getPopupContainer: getContextPopupContainer,
|
||||
getPrefixCls,
|
||||
}: ConfigConsumerProps) => {
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
footer,
|
||||
visible,
|
||||
wrapClassName,
|
||||
centered,
|
||||
getContainer,
|
||||
...restProps
|
||||
} = this.props;
|
||||
|
||||
@ -216,6 +220,7 @@ export default class Modal extends React.Component<ModalProps, {}> {
|
||||
return (
|
||||
<Dialog
|
||||
{...restProps}
|
||||
getContainer={getContainer || getContextPopupContainer}
|
||||
prefixCls={prefixCls}
|
||||
wrapClassName={classNames({ [`${prefixCls}-centered`]: !!centered }, wrapClassName)}
|
||||
footer={footer === undefined ? defaultFooter : footer}
|
||||
|
Loading…
Reference in New Issue
Block a user