mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
Updating type: TreeSelectProps.getPopupContainer (#14443)
TreeSelectProps extends AbstractSelectProps. However, the method signatures are different causing compilation issue with typescript: ``` Failed to compile. /home/kasra/Desktop/Repos/frontend/node_modules/antd/lib/tree-select/interface.d.ts Type error: Interface 'TreeSelectProps' incorrectly extends interface 'AbstractSelectProps'. Types of property 'getPopupContainer' are incompatible. Type '((triggerNode: Element) => HTMLElement) | undefined' is not assignable to type '((triggerNode?: Element | undefined) => HTMLElement) | undefined'. Type '(triggerNode: Element) => HTMLElement' is not assignable to type '(triggerNode?: Element | undefined) => HTMLElement'. Types of parameters 'triggerNode' and 'triggerNode' are incompatible. Type 'Element | undefined' is not assignable to type 'Element'. Type 'undefined' is not assignable to type 'Element'. TS2430 24 | rootPId?: string; 25 | } > 26 | export interface TreeSelectProps extends AbstractSelectProps { | ^ 27 | autoFocus?: boolean; 28 | defaultValue?: string | number | Array<any>; ```
This commit is contained in:
parent
b1c1b02030
commit
4e116962f2
@ -34,7 +34,7 @@ export interface TreeSelectProps extends AbstractSelectProps {
|
||||
defaultValue?: string | number | Array<any>;
|
||||
dropdownStyle?: React.CSSProperties;
|
||||
filterTreeNode?: (inputValue: string, treeNode: any) => boolean | boolean;
|
||||
getPopupContainer?: (triggerNode: Element) => HTMLElement;
|
||||
getPopupContainer?: (triggerNode?: Element) => HTMLElement;
|
||||
labelInValue?: boolean;
|
||||
loadData?: (node: any) => void;
|
||||
maxTagCount?: number;
|
||||
|
Loading…
Reference in New Issue
Block a user