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
Tree.DirectoryTree - defaultExpandAll does not work when using treeData #19132
Comments
…ork when using treeData
…ork when using treeData
…ork when using treeData
…ork when using treeData
I'm experiencing this issue when the tree data is updated. When using |
I had the same problem and realize it was because all keys in treedata has changed. |
Was this resolved for v4.x? |
you should to add a v-if condition, after that it will work |
Reproduction link
https://codepen.io/pfcodes/pen/WNNvpOP
Steps to reproduce
Use: <Tree.DirectoryTree treeData={[]} defaultExpandAll></Tree.DirectoryTree> instead of <Tree.DirectoryTree defaultExpandAll>{TreeNode[]}</Tree.DirectoryTree>
What is expected?
All tree nodes should be expanded.
What is actually happening?
Tree nodes are not expanded.
I needed to recursively create
TreeNodes
. TheDirectoryTree
component does not allow any component other thanTreeNode
to be used as a child. Since I could not use custom components (i.e., DirectoryNode/FileNode) that were output from a recursive function that first determines whether a node is a directory or file, I foundtreeData
and used that instead. I noticed the bug then.The text was updated successfully, but these errors were encountered: