mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 04:58:55 +08:00
Merge pull request #15156 from ant-design/date-picker-popup
fix configProvider getPopupContainer not work with DatePicker
This commit is contained in:
commit
19d916fd20
@ -130,13 +130,15 @@ export default function wrapPicker(Picker: React.ComponentClass<any>, pickerType
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ConfigConsumer>
|
<ConfigConsumer>
|
||||||
{({ getPrefixCls }: ConfigConsumerProps) => {
|
{({ getPrefixCls, getPopupContainer: getContextPopupContainer }: ConfigConsumerProps) => {
|
||||||
const {
|
const {
|
||||||
prefixCls: customizePrefixCls,
|
prefixCls: customizePrefixCls,
|
||||||
inputPrefixCls: customizeInputPrefixCls,
|
inputPrefixCls: customizeInputPrefixCls,
|
||||||
|
getCalendarContainer,
|
||||||
size,
|
size,
|
||||||
disabled,
|
disabled,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
const getPopupContainer = getCalendarContainer || getContextPopupContainer;
|
||||||
const prefixCls = getPrefixCls('calendar', customizePrefixCls);
|
const prefixCls = getPrefixCls('calendar', customizePrefixCls);
|
||||||
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
||||||
const pickerClass = classNames(`${prefixCls}-picker`, {
|
const pickerClass = classNames(`${prefixCls}-picker`, {
|
||||||
@ -170,6 +172,7 @@ export default function wrapPicker(Picker: React.ComponentClass<any>, pickerType
|
|||||||
return (
|
return (
|
||||||
<Picker
|
<Picker
|
||||||
{...this.props}
|
{...this.props}
|
||||||
|
getCalendarContainer={getPopupContainer}
|
||||||
format={mergedFormat}
|
format={mergedFormat}
|
||||||
ref={this.savePicker}
|
ref={this.savePicker}
|
||||||
pickerClass={pickerClass}
|
pickerClass={pickerClass}
|
||||||
|
Loading…
Reference in New Issue
Block a user