New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript error using TreeNode component #11604

Closed
pheadra opened this Issue Aug 4, 2018 · 6 comments

Comments

Projects
None yet
4 participants
@pheadra

pheadra commented Aug 4, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.7.3

Environment

Using Chrome on Mac osx

Reproduction link

https://github.com/ant-design/ant-design/blob/master/components/tree/Tree.tsx

Steps to reproduce

mport tree component, try to use it..get a typescript error for selectable attribute on TreeNode

What is expected?

No error message

What is actually happening?

Error:(250, 17) TS2339: Property 'selectable' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<AntTreeNodeProps, ComponentState, any>> & Readonly<{ children?: ReactNode; }> & Readonly'.

@pheadra

This comment has been minimized.

pheadra commented Aug 4, 2018

maybe insert "selectable?: boolean;"
https://github.com/ant-design/ant-design/blob/master/components/tree/Tree.tsx

export interface AntTreeNodeProps {
className?: string;
disabled?: boolean;
disableCheckbox?: boolean;
title?: string | React.ReactNode;
key?: string;
eventKey?: string;
isLeaf?: boolean;
checked?: boolean;
expanded?: boolean;
selected?: boolean;
selectable?: boolean;
icon?: ((treeNode: AntdTreeNodeAttribute) => React.ReactNode) | React.ReactNode;
children?: React.ReactNode;
}

@afc163

This comment has been minimized.

Member

afc163 commented Aug 4, 2018

PR is welcome

@IssuehuntBot

This comment has been minimized.

IssuehuntBot commented Aug 7, 2018

@BoostIO funded this issue with $10. Visit this issue on Issuehunt

@IssuehuntBot

This comment has been minimized.

IssuehuntBot commented Aug 7, 2018

apieceofbart pushed a commit to apieceofbart/ant-design that referenced this issue Aug 7, 2018

@IssuehuntBot

This comment has been minimized.

IssuehuntBot commented Aug 7, 2018

yesmeck added a commit that referenced this issue Aug 13, 2018

@yesmeck yesmeck closed this Aug 13, 2018

@IssuehuntBot

This comment has been minimized.

IssuehuntBot commented Aug 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment