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
Dynamic Tree with antd Tree & TreeNode #4688
Comments
Hello @drcmda, Change your code to: <Tree>
{ instances.map(instance =>
<Tree.TreeNode key={instance} title={doing something dynamic here} />)
}
</Tree> |
@yesmeck I'm afraid that isn't possible, because it would mean i need to have the nested structure beforehand, but only nested components know their their subcomponents (they're tied to state). I ended up writing my own tree, though. I have my hopes up this will be addressed one day. :) |
@yesmeck @benjycui @warmhug I'd really appreciate the |
It looks like the ant tree is not dynamic/component oriented. There's no way to return a treenode without running into errors like
TypeError: props.filterTreeNode is not a function
.I don't know how to solve this. Each leaf component must be reactive, there is no way that i could get all the nested data beforehand, unless i render the entire tree for each change, which isn't possible due to performance concerns.
The text was updated successfully, but these errors were encountered: