diff --git a/components/cascader/index.tsx b/components/cascader/index.tsx index 60048dd9c9..e34dc6aa22 100644 --- a/components/cascader/index.tsx +++ b/components/cascader/index.tsx @@ -60,7 +60,7 @@ export interface CascaderProps { onPopupVisibleChange?: (popupVisible: boolean) => void; prefixCls?: string; inputPrefixCls?: string; - getPopupContainer?: (triggerNode: Element) => HTMLElement; + getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement; } function highlightKeyword(str: string, keyword: string, prefixCls: string) { diff --git a/components/date-picker/index.tsx b/components/date-picker/index.tsx index 3d03cd761c..7fdee1dcb4 100755 --- a/components/date-picker/index.tsx +++ b/components/date-picker/index.tsx @@ -19,7 +19,7 @@ export interface PickerProps { popupStyle?: React.CSSProperties; locale?: any; size?: 'large' | 'small' | 'default'; - getCalendarContainer?: (trigger: any) => React.ReactNode; + getCalendarContainer?: (triggerNode?: HTMLElement) => HTMLElement; open?: boolean; onOpenChange?: (status: boolean) => void; disabledDate?: (current: moment.Moment) => boolean; diff --git a/components/dropdown/dropdown.tsx b/components/dropdown/dropdown.tsx index 84ddd7ae61..fb4bff3597 100644 --- a/components/dropdown/dropdown.tsx +++ b/components/dropdown/dropdown.tsx @@ -9,7 +9,7 @@ export interface DropDownProps { onVisibleChange?: (visible?: boolean) => void; visible?: boolean; align?: Object; - getPopupContainer?: () => HTMLElement; + getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement; prefixCls?: string; placement?: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight'; } diff --git a/components/mention/index.tsx b/components/mention/index.tsx index 16645c2e2b..29a2dd8f5a 100644 --- a/components/mention/index.tsx +++ b/components/mention/index.tsx @@ -19,7 +19,7 @@ export interface MentionProps { multiLines?: Boolean; prefix?: string; placeholder?: string; - getSuggestionContainer?: Function; + getSuggestionContainer?: (triggerNode?: HTMLElement) => HTMLElement; onFocus?: Function; onBlur?: Function; } diff --git a/components/select/index.tsx b/components/select/index.tsx index c96ab6ce28..44cd08b0d8 100755 --- a/components/select/index.tsx +++ b/components/select/index.tsx @@ -35,7 +35,7 @@ export interface SelectProps extends AbstractSelectProps { optionFilterProp?: string; defaultActiveFirstOption?: boolean; labelInValue?: boolean; - getPopupContainer?: (triggerNode: React.ReactNode) => React.ReactNode | HTMLElement; + getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement; dropdownStyle?: React.CSSProperties; dropdownMenuStyle?: React.CSSProperties; onChange?: (value: SelectValue) => void; diff --git a/components/time-picker/index.tsx b/components/time-picker/index.tsx index dd0a029b44..160a0926de 100644 --- a/components/time-picker/index.tsx +++ b/components/time-picker/index.tsx @@ -20,7 +20,7 @@ export interface TimePickerProps { disabledMinutes?: (selectedHour: number) => number[]; disabledSeconds?: (selectedHour: number, selectedMinute: number) => number[]; style?: React.CSSProperties; - getPopupContainer?: (trigger: any) => any; + getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; addon?: Function; } diff --git a/components/tooltip/index.tsx b/components/tooltip/index.tsx index edb0c1f53c..6756cc3772 100644 --- a/components/tooltip/index.tsx +++ b/components/tooltip/index.tsx @@ -24,9 +24,9 @@ export interface AbstractTooltipProps { trigger?: 'hover' | 'focus' | 'click'; openClassName?: string; arrowPointAtCenter?: boolean; - // getTooltipContainer had been rename to getPopupDomNode - getTooltipContainer?: (triggerNode: Element) => HTMLElement; - getPopupContainer?: (triggerNode: Element) => HTMLElement; + // getTooltipContainer had been rename to getPopupContainer + getTooltipContainer?: (triggerNode?: HTMLElement) => HTMLElement; + getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement; children?: React.ReactElement; } diff --git a/components/tree-select/interface.tsx b/components/tree-select/interface.tsx index 7db3b39d73..e4778d2774 100644 --- a/components/tree-select/interface.tsx +++ b/components/tree-select/interface.tsx @@ -39,5 +39,5 @@ export interface TreeSelectProps { notFoundContent?: React.ReactNode; labelInValue?: boolean; treeCheckStrictly?: boolean; - getPopupContainer?: (triggerNode: React.ReactNode) => HTMLElement; + getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement; }