From 0af6bded1dd1cd6a09720eecc03cee18c6367128 Mon Sep 17 00:00:00 2001 From: zombiej Date: Mon, 4 Mar 2019 11:11:50 +0800 Subject: [PATCH] fix configProvider getPopupContainer not work with DatePicker --- components/date-picker/wrapPicker.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/date-picker/wrapPicker.tsx b/components/date-picker/wrapPicker.tsx index 8a234a5dc4..888353ecdb 100644 --- a/components/date-picker/wrapPicker.tsx +++ b/components/date-picker/wrapPicker.tsx @@ -130,13 +130,15 @@ export default function wrapPicker(Picker: React.ComponentClass, pickerType return ( - {({ getPrefixCls }: ConfigConsumerProps) => { + {({ getPrefixCls, getPopupContainer: getContextPopupContainer }: ConfigConsumerProps) => { const { prefixCls: customizePrefixCls, inputPrefixCls: customizeInputPrefixCls, + getCalendarContainer, size, disabled, } = this.props; + const getPopupContainer = getCalendarContainer || getContextPopupContainer; const prefixCls = getPrefixCls('calendar', customizePrefixCls); const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls); const pickerClass = classNames(`${prefixCls}-picker`, { @@ -170,6 +172,7 @@ export default function wrapPicker(Picker: React.ComponentClass, pickerType return (