Skip to content

Commit

Permalink
fix modal not support configProvider (#17132)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Jun 17, 2019
1 parent dc1572c commit b402517
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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}
Expand Down

0 comments on commit b402517

Please sign in to comment.