question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug Report] v-treeview - Error when adding and removing a child

See original GitHub issue

Versions and Environment

Vuetify: 1.3.9 Vue: 2.5.16 Browsers: Chrome 70.0.3538.102 OS: Windows 10

Steps to reproduce

  1. Open node “Applications”
  2. Add a new child by clicking the “Add to applications” button
  3. Remove the node by clicking the “Remove from applications” button
  4. Add a new child again
  5. 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:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
pbteja1998commented, Feb 12, 2020

Anyone else facing the same problem, I solved this by adding item-key to the treeview. So, if you do not have item-key set as some unique value for each item, then add that.

0reactions
lyutiancommented, Aug 12, 2022

Anyone else facing the same problem, I solved this by adding item-key to the treeview. So, if you do not have item-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 and item-key set to unique id.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found