Skip to content
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
1 task
pheadra opened this issue Aug 4, 2018 · 6 comments
Closed
1 task

Typescript error using TreeNode component #11604

pheadra opened this issue Aug 4, 2018 · 6 comments
Assignees

Comments

@pheadra
Copy link

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
Copy link
Author

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
Copy link
Member

afc163 commented Aug 4, 2018

PR is welcome

@IssueHuntBot
Copy link

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

@IssueHuntBot
Copy link

@apieceofbart has started working. Visit this issue on Issuehunt

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

@apieceofbart has submitted output. Visit this issue on Issuehunt

@IssueHuntBot
Copy link

@afc163 has rewarded. Visit this issue on Issuehunt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants