[Bug Report] v-treeview - Error when adding and removing a child
See original GitHub issueVersions and Environment
Vuetify: 1.3.9 Vue: 2.5.16 Browsers: Chrome 70.0.3538.102 OS: Windows 10
Steps to reproduce
- Open node “Applications”
- Add a new child by clicking the “Add to applications” button
- Remove the node by clicking the “Remove from applications” button
- Add a new child again
- Check the console for the error
Expected Behavior
A new node should be added
Actual Behavior
The following error is thrown:
[Vue warn]: Error in created hook: "TypeError: Cannot set property 'vnode' of undefined"
found in
<VTreeviewNode>... (1 recursive calls)
<VTreeview>
...
TypeError: Cannot set property 'vnode' of undefined
at VueComponent.register
at VueComponent.created
at callHook
at VueComponent.Vue._init
at new VueComponent
at createComponentInstanceForVnode
at init
at createComponent
at createElm
at addVnodes
Reproduction Link
https://codepen.io/anon/pen/OavdWd?editors=1011
Comment
I found a similar closed issue #5543.
Not sure if it is the same problem though.
The issue was closed but not solved anyway, so I don’t think it makes a difference.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:6 (1 by maintainers)
Top Results From Across the Web
[Bug Report] v-treeview - Error when adding and removing a ...
1) Open node "Applications" · 2) Add a new child by clicking the "Add to applications" button · 3) Remove the node by...
Read more >Vuetify Treeview - Error Loading Children Asynchronously
I just had the same problem and made a quick workaround where I clone the parent node. Before pushing the children items
Read more >Progress® Telerik® UI for WinForms Feedback Portal
The Treeview is not updated if I add and remove the same element instance to ... 3 children, the first of which is...
Read more >tkinter.ttk — Tk themed widgets — Python 3.11.1 documentation
Each child window is associated with a tab, which the user may select to change the currently ... Delete all specified items and...
Read more >How to file a bug - Fedora Docs
The package maintainer can then look at the bug report and decide the best course of ... If there is nothing more to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Anyone else facing the same problem, I solved this by adding
item-key
to thetreeview
. So, if you do not haveitem-key
set as some unique value for each item, then add that.Adding
item-key
doesn’t fix my situation. 😢 Still get this error when add new to a leaf node, even the vuex store already updated anditem-key
set to uniqueid
.