From 47589ba92cd21ee7a3d84870c707523b668774d1 Mon Sep 17 00:00:00 2001 From: "HJin.me" Date: Tue, 28 Mar 2017 13:20:05 +0800 Subject: [PATCH] fix get(Popup|Calendar|Suggestion|Tooltip)Container ts type (#5528) --- components/cascader/index.tsx | 2 +- components/date-picker/index.tsx | 2 +- components/dropdown/dropdown.tsx | 2 +- components/mention/index.tsx | 2 +- components/select/index.tsx | 2 +- components/table/SelectionCheckboxAll.tsx | 2 +- components/time-picker/index.tsx | 2 +- components/tooltip/index.tsx | 4 ++-- components/tree-select/interface.tsx | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/components/cascader/index.tsx b/components/cascader/index.tsx index 309656ecec..c9d6219b80 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?: HTMLElement) => HTMLElement; + getPopupContainer?: (triggerNode: Element) => HTMLElement; } function highlightKeyword(str: string, keyword: string, prefixCls: string) { diff --git a/components/date-picker/index.tsx b/components/date-picker/index.tsx index 7fdee1dcb4..ab3912635a 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?: (triggerNode?: HTMLElement) => HTMLElement; + getCalendarContainer?: (triggerNode: Element) => 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 fb4bff3597..25cc768fbb 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?: (triggerNode?: HTMLElement) => HTMLElement; + getPopupContainer?: (triggerNode: Element) => HTMLElement; prefixCls?: string; placement?: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight'; } diff --git a/components/mention/index.tsx b/components/mention/index.tsx index d036a1dbbb..3c1a583a02 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?: (triggerNode?: HTMLElement) => HTMLElement; + getSuggestionContainer?: (triggerNode: Element) => HTMLElement; onFocus?: Function; onBlur?: Function; } diff --git a/components/select/index.tsx b/components/select/index.tsx index 44cd08b0d8..e6e3acdab1 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?: HTMLElement) => HTMLElement; + getPopupContainer?: (triggerNode: Element) => HTMLElement; dropdownStyle?: React.CSSProperties; dropdownMenuStyle?: React.CSSProperties; onChange?: (value: SelectValue) => void; diff --git a/components/table/SelectionCheckboxAll.tsx b/components/table/SelectionCheckboxAll.tsx index da7c802472..f768259742 100644 --- a/components/table/SelectionCheckboxAll.tsx +++ b/components/table/SelectionCheckboxAll.tsx @@ -175,7 +175,7 @@ export default class SelectionCheckboxAll extends React.Component trigger.parentNode as HTMLElement} + getPopupContainer={trigger => trigger.parentNode as HTMLElement} >
diff --git a/components/time-picker/index.tsx b/components/time-picker/index.tsx index 9c2b15157c..ab799db67f 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?: (triggerNode: HTMLElement) => HTMLElement; + getPopupContainer?: (triggerNode: Element) => HTMLElement; addon?: Function; } diff --git a/components/tooltip/index.tsx b/components/tooltip/index.tsx index d6548f474a..4405af762b 100644 --- a/components/tooltip/index.tsx +++ b/components/tooltip/index.tsx @@ -25,8 +25,8 @@ export interface AbstractTooltipProps { openClassName?: string; arrowPointAtCenter?: boolean; // getTooltipContainer had been rename to getPopupContainer - getTooltipContainer?: (triggerNode?: HTMLElement) => HTMLElement; - getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement; + getTooltipContainer?: (triggerNode: Element) => HTMLElement; + getPopupContainer?: (triggerNode: Element) => HTMLElement; children?: React.ReactElement; } diff --git a/components/tree-select/interface.tsx b/components/tree-select/interface.tsx index e4778d2774..30118c6766 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?: HTMLElement) => HTMLElement; + getPopupContainer?: (triggerNode: Element) => HTMLElement; }