Fix getPopupContainer ts type

This commit is contained in:
afc163 2017-03-21 16:35:31 +08:00
parent fd7b5bdcf4
commit 322e9efdc9
8 changed files with 10 additions and 10 deletions

View File

@ -60,7 +60,7 @@ export interface CascaderProps {
onPopupVisibleChange?: (popupVisible: boolean) => void; onPopupVisibleChange?: (popupVisible: boolean) => void;
prefixCls?: string; prefixCls?: string;
inputPrefixCls?: string; inputPrefixCls?: string;
getPopupContainer?: (triggerNode: Element) => HTMLElement; getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
} }
function highlightKeyword(str: string, keyword: string, prefixCls: string) { function highlightKeyword(str: string, keyword: string, prefixCls: string) {

View File

@ -19,7 +19,7 @@ export interface PickerProps {
popupStyle?: React.CSSProperties; popupStyle?: React.CSSProperties;
locale?: any; locale?: any;
size?: 'large' | 'small' | 'default'; size?: 'large' | 'small' | 'default';
getCalendarContainer?: (trigger: any) => React.ReactNode; getCalendarContainer?: (triggerNode?: HTMLElement) => HTMLElement;
open?: boolean; open?: boolean;
onOpenChange?: (status: boolean) => void; onOpenChange?: (status: boolean) => void;
disabledDate?: (current: moment.Moment) => boolean; disabledDate?: (current: moment.Moment) => boolean;

View File

@ -9,7 +9,7 @@ export interface DropDownProps {
onVisibleChange?: (visible?: boolean) => void; onVisibleChange?: (visible?: boolean) => void;
visible?: boolean; visible?: boolean;
align?: Object; align?: Object;
getPopupContainer?: () => HTMLElement; getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
prefixCls?: string; prefixCls?: string;
placement?: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight'; placement?: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
} }

View File

@ -19,7 +19,7 @@ export interface MentionProps {
multiLines?: Boolean; multiLines?: Boolean;
prefix?: string; prefix?: string;
placeholder?: string; placeholder?: string;
getSuggestionContainer?: Function; getSuggestionContainer?: (triggerNode?: HTMLElement) => HTMLElement;
onFocus?: Function; onFocus?: Function;
onBlur?: Function; onBlur?: Function;
} }

View File

@ -35,7 +35,7 @@ export interface SelectProps extends AbstractSelectProps {
optionFilterProp?: string; optionFilterProp?: string;
defaultActiveFirstOption?: boolean; defaultActiveFirstOption?: boolean;
labelInValue?: boolean; labelInValue?: boolean;
getPopupContainer?: (triggerNode: React.ReactNode) => React.ReactNode | HTMLElement; getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
dropdownStyle?: React.CSSProperties; dropdownStyle?: React.CSSProperties;
dropdownMenuStyle?: React.CSSProperties; dropdownMenuStyle?: React.CSSProperties;
onChange?: (value: SelectValue) => void; onChange?: (value: SelectValue) => void;

View File

@ -20,7 +20,7 @@ export interface TimePickerProps {
disabledMinutes?: (selectedHour: number) => number[]; disabledMinutes?: (selectedHour: number) => number[];
disabledSeconds?: (selectedHour: number, selectedMinute: number) => number[]; disabledSeconds?: (selectedHour: number, selectedMinute: number) => number[];
style?: React.CSSProperties; style?: React.CSSProperties;
getPopupContainer?: (trigger: any) => any; getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
addon?: Function; addon?: Function;
} }

View File

@ -24,9 +24,9 @@ export interface AbstractTooltipProps {
trigger?: 'hover' | 'focus' | 'click'; trigger?: 'hover' | 'focus' | 'click';
openClassName?: string; openClassName?: string;
arrowPointAtCenter?: boolean; arrowPointAtCenter?: boolean;
// getTooltipContainer had been rename to getPopupDomNode // getTooltipContainer had been rename to getPopupContainer
getTooltipContainer?: (triggerNode: Element) => HTMLElement; getTooltipContainer?: (triggerNode?: HTMLElement) => HTMLElement;
getPopupContainer?: (triggerNode: Element) => HTMLElement; getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
children?: React.ReactElement<any>; children?: React.ReactElement<any>;
} }

View File

@ -39,5 +39,5 @@ export interface TreeSelectProps {
notFoundContent?: React.ReactNode; notFoundContent?: React.ReactNode;
labelInValue?: boolean; labelInValue?: boolean;
treeCheckStrictly?: boolean; treeCheckStrictly?: boolean;
getPopupContainer?: (triggerNode: React.ReactNode) => HTMLElement; getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
} }