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;
prefixCls?: string;
inputPrefixCls?: string;
getPopupContainer?: (triggerNode: Element) => HTMLElement;
getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
}
function highlightKeyword(str: string, keyword: string, prefixCls: string) {

View File

@ -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;

View File

@ -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';
}

View File

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

View File

@ -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;

View File

@ -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;
}

View File

@ -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<any>;
}

View File

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