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

custom data object for each treenode #1989

Closed
yaron-lavi-deel opened this issue Jan 11, 2018 · 4 comments
Closed

custom data object for each treenode #1989

yaron-lavi-deel opened this issue Jan 11, 2018 · 4 comments

Comments

@yaron-lavi-deel
Copy link

We're using the tree component, and have the need to a custom data object for each node; alas, I could not find any userData or similar property in ITreeNodeProps.

Can this feature be added, or some workaround be suggested? this is quite critical for any production-level app using a tree.

@giladgray
Copy link
Contributor

@yaronlavi such a thing does not seem to exist, but we'd happily accept a PR to add such a feature.

either a new userData key or simply [key: string]: any index support would solve this handily.

@yaron-lavi-deel
Copy link
Author

a userData:any seems more generic and common to me. PR #1998 opened.
thanks.

@adidahiya
Copy link
Contributor

We require all nodes to have a unique ID. I think you can use your own data structure to store this data and simply look up the data object you need for each node.

@giladgray
Copy link
Contributor

@adidahiya's id lookup proposal actually seems sufficient for this feature.

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

No branches or pull requests

3 participants