mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 07:56:28 +08:00
fix configProvider getPopupContainer not work with DatePicker
This commit is contained in:
parent
e392605230
commit
0af6bded1d
@ -130,13 +130,15 @@ export default function wrapPicker(Picker: React.ComponentClass<any>, pickerType
|
||||
|
||||
return (
|
||||
<ConfigConsumer>
|
||||
{({ 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<any>, pickerType
|
||||
return (
|
||||
<Picker
|
||||
{...this.props}
|
||||
getCalendarContainer={getPopupContainer}
|
||||
format={mergedFormat}
|
||||
ref={this.savePicker}
|
||||
pickerClass={pickerClass}
|
||||
|
Loading…
Reference in New Issue
Block a user