Skip to content

Update node from walkTreeData #48

Open
@marco-viewpoint

Description

@marco-viewpoint

I'm trying to walk the tree and update nodes.

I tried using code I found for earlier versions, but it doesn't seem to work anymore with Vue 3 / he-tree-vue 3.0.0.

Trying to use this.$set() results in this error:

TypeError: _this2.$set is not a function
    at eval (ModelTreeView.vue?98ec:35)
    at func (helper-js.esm.js?0fa5:889)
    at depthFirstSearch (helper-js.esm.js?0fa5:907)
    at TreeData.walk (helper-js.esm.js?0fa5:1145)
    at walkTreeData (he-tree-vue.esm.js?94dd:20)
    at Proxy.walkTreeData$1 (he-tree-vue.esm.js?94dd:193)
    at Proxy.showHidden (ModelTreeView.vue?98ec:34)
    at eval (Model.vue?1751:225)

I prepared a sandbox to reproduce the issue. Please click "Hide" or "Show hidden" to trigger it:
https://codesandbox.io/s/vue-cli-and-he-tree-vue-example-forked-xv1ww?file=/src/components/TreeView.vue

How can I walk through all the nodes of the tree and update their attributes?

Thank you for your help and this amazing component!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions